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

Memory leak in awt_util.c

XMLWordPrintable

    • generic
    • generic



      Name: mf23781 Date: 04/29/98


      Memory leak in awt_util.c

      There is a function, awt_util_runningWindowManager(), in awt_util.c that
      is new in 116. Inspection shows that it will cause a memory leak:

                  atomName = XGetAtomName(XtDisplay(w), propAtomList[index]);
      if (atomName != NULL)
      {
      if (!strcmp(atomName, "_MOTIF_WM_INFO"))
      return(MOTIF_WM);
      else
      if (!strcmp(atomName, "_SUN_WM_PROTOCOLS"))
      return(OPENLOOK_WM);
      XFree(atomName);
      }

      atomName is not freed when one or other strcmp is successful. This function is
      called by the shell widget event handler in awt_Frame.c. It is called whenever
      there is a ReparentNotify on the shell widget.

      ======================================================================

            duke J. Duke
            miflemi Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: