[PATCH 2/2] glxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2)
Adam Jackson
ajax at redhat.com
Wed Apr 30 10:49:06 PDT 2014
v2: Fix another path spotted by keithp
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
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 964db40..23c3366 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -2009,6 +2009,7 @@ CreateGLXPixmap(__GLXclientState * cl,
}
else {
client->errorValue = (visual ? visual : fbconfigId);
+ free(pGlxPixmap->be_xids);
free(pGlxPixmap);
return BadValue;
}
@@ -2017,6 +2018,7 @@ CreateGLXPixmap(__GLXclientState * cl,
}
if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
+ free(pGlxPixmap->be_xids);
free(pGlxPixmap);
return BadAlloc;
}
--
1.8.5.3
More information about the xorg-devel
mailing list