mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-25 01:59:56 +00:00
glxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2)
v2: Fix another path spotted by keithp Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
committed by
Keith Packard
parent
dff1f5e1a9
commit
d9e99edd4d
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user