[PATCH 0/5] Fixes for leaks reported by cppcheck [Bug 50281]

Alan Coopersmith alan.coopersmith at oracle.com
Sun Feb 10 12:39:31 PST 2013


Fixes for 5 of the 7 leaks found by cppcheck and reported in
https://bugs.freedesktop.org/show_bug.cgi?id=50281

Not fixed:
- hw/dmx/dmxfont.c:408, function dmxBELoadFont
  "after all operations with goodfps we must have free(goodfps);"
- hw/dmx/glxProxy/glxcmds.c:1981 , function CreateGLXPixmap
  "if we do free(pGlxPixmap), we must call free(pGlxPixmap.be_xids) too"

Alan Coopersmith (5):
  __glXDRIscreenCreateContext: free context on failure, instead of
    leaking it
  __glXDRIscreenProbe: free screen when DRI2Connect fails, instead of
    leaking it
  dmxVDLRead: if we opened a file, close it instead of leaking it
  xf86SbusCmapLoadPalette: Delay malloc until needed, avoiding leak on
    error
  sparcPromPathname2Node: free name when returning error, instead of
    leaking it

 glx/glxdri.c                     |    8 ++++++--
 glx/glxdri2.c                    |    1 +
 hw/dmx/config/dmxcompat.c        |    4 ++++
 hw/xfree86/common/xf86sbusBus.c  |    4 ++--
 hw/xfree86/os-support/bus/Sbus.c |    8 ++++++--
 5 files changed, 19 insertions(+), 6 deletions(-)

-- 
1.7.9.2



More information about the xorg-devel mailing list