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>
(cherry picked from commit 164753f158)
This commit is contained in:
Julien Cristau 2016-03-07 23:20:29 +01:00 committed by Adam Jackson
parent dcbf88aea7
commit 8616bd95de

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