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:
parent
dff1f5e1a9
commit
d9e99edd4d
|
@ -2009,6 +2009,7 @@ CreateGLXPixmap(__GLXclientState * cl,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
client->errorValue = (visual ? visual : fbconfigId);
|
client->errorValue = (visual ? visual : fbconfigId);
|
||||||
|
free(pGlxPixmap->be_xids);
|
||||||
free(pGlxPixmap);
|
free(pGlxPixmap);
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
@ -2017,6 +2018,7 @@ CreateGLXPixmap(__GLXclientState * cl,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
|
if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
|
||||||
|
free(pGlxPixmap->be_xids);
|
||||||
free(pGlxPixmap);
|
free(pGlxPixmap);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user