[hw/dmx 5/7] hw/dmx/glxProxy/glxcmds.c: Fix leak of bx_xids

Niels Thykier niels at thykier.net
Fri Nov 2 02:41:51 PDT 2012


Signed-off-by: Niels Thykier <niels at thykier.net>
---
 hw/dmx/glxProxy/glxcmds.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 91011d1..f75fd0e 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -1981,6 +1981,7 @@ CreateGLXPixmap(__GLXclientState * cl,
         }
         else {
             client->errorValue = (visual ? visual : fbconfigId);
+            free(pGlxPixmap->be_xids);
             free(pGlxPixmap);
             return BadValue;
         }
@@ -1989,6 +1990,7 @@ CreateGLXPixmap(__GLXclientState * cl,
     }
 
     if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
+        free(pGlxPixmap->be_xids);
         free(pGlxPixmap);
         return BadAlloc;
     }
-- 
1.7.10.4



More information about the xorg-devel mailing list