Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4141979

AWT use of XmFontListAppendEntry causes memory leak

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      generic
    • OS:
      solaris_2.5.1
    • Verification:
      Not verified

      Backports

        Description

        XmFontListAppendEntry() is used in several places in the Motif port of
        the AWT (multifont.c, awt_FileDialog.c, awt_TextArea.c, awt_TextField.c).

        The man page for XmFontListAppendEntry() states ...

        " This function deallocates the original font list after
             extracting the required information. The caller must free
             the font list entry by using

        Our code never frees the font list entry (i.e. never calls XmFontListEntryFree)

        This creates a leak of 44 bytes per call to XmFontListAppendEntry().
        Since at least one of the calls is in a for loop, there is a potential
        to leak a few hundred bytes per call (and this function is called frequently).


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rkhansunw Robi Khan (Inactive)
                  Reporter:
                  duke J. Duke (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: