dmx/glxProxy: don't free the glx pixmap twice if AddResource fails

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
Julien Cristau 2016-03-07 23:20:29 +01:00 committed by Adam Jackson
parent 59b9c3d5e4
commit 164753f158

View File

@ -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;
}