Summary: | Xorg-server memory leaks found with cppcheck | ||
---|---|---|---|
Product: | xorg | Reporter: | Eduard <karbofos> |
Component: | Server/General | Assignee: | Xorg Project Team <xorg-team> |
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | critical | ||
Priority: | high | CC: | jeremyhu, karbofos |
Version: | git | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://cgit.freedesktop.org/xorg/xserver/ | ||
Whiteboard: | 2012BRB_Reviewed | ||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 55203 |
Description
Eduard
2012-05-23 06:49:40 UTC
There is no data to support this being a regression, so removing that keyword and the block on 1.12. I have not audited the others, but the XQuartz one is not a leak. yes, you are right in case xquartz. i checked other files: // // glx/glxdri.c:639, function __glXDRIscreenCreateContext should be every time in case return NULL: free(context); // // glx/glxdri2.c:700, function __glXDRIscreenProbe should be every time in case return NULL: free(screen); // // hw/dmx/config/dmxcompat.c:231, function dmxVDLRead FILE *str; must be closed before return // // hw/dmx/dmxfont.c:408, function dmxBELoadFont after all operations with goodfps we must have free(goodfps); before name_atom = MakeAtom("FONT", 4, TRUE); // // hw/dmx/glxProxy/glxcmds.c:1981 , function CreateGLXPixmap if we do free(pGlxPixmap), we must call free(pGlxPixmap.be_xids) too // // hw/xfree86/common/xf86sbusBus.c:647, function xf86SbusCmapLoadPalette if (!cmap) return; change to if (!cmap){ free(data); return; } // // hw/xfree86/os-support/bus/Sbus.c:621, function sparcPromPathname2Node if we return from function, data should be removed from memory other messages you can ignore, sorry for the mistakes Send patches for 5 of the 7 to xorg-devel for review. Still waiting for someone else to fix: // hw/dmx/dmxfont.c:408, function dmxBELoadFont // hw/dmx/glxProxy/glxcmds.c:1981 , function CreateGLXPixmap Those 5 are now pulled into the xserver master branch: http://cgit.freedesktop.org/xorg/xserver/commit/?id=2746c681639f9512e6e45fb8d0151b996b6aff7f Leaving the bug open until someone picks up the last two. commit d9e99edd4dcf109492abdaa73ccf8f29d5bfd159 Author: Adam Jackson <ajax@redhat.com> Date: Wed Apr 30 13:49:06 2014 -0400 glxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2) v2: Fix another path spotted by keithp Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit dff1f5e1a9608eda2992fc9e3304edee7b5bee9b Author: Adam Jackson <ajax@redhat.com> Date: Wed Apr 30 13:49:05 2014 -0400 dmx: Fix memory leak in dmxBELoadFont (#50281) Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Keith Packard <keithp@keithp.com> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.