From 164753f158e78f615f903467bfd234d7c58244ef Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Mon, 7 Mar 2016 23:20:29 +0100 Subject: [PATCH] dmx/glxProxy: don't free the glx pixmap twice if AddResource fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau --- hw/dmx/glxProxy/glxcmds.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c index ddcb98135..a77d556db 100644 --- a/hw/dmx/glxProxy/glxcmds.c +++ b/hw/dmx/glxProxy/glxcmds.c @@ -2010,11 +2010,8 @@ CreateGLXPixmap(__GLXclientState * cl, XFlush(dpy); } - if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) { - free(pGlxPixmap->be_xids); - free(pGlxPixmap); + if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) return BadAlloc; - } return Success; }