mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-26 00:40:05 +01:00
Xext: Fix a memory leak
Based on: https://patchwork.freedesktop.org/patch/85636/ Rewritten to also free the resources allocated by panoramix_setup_ids(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Emi Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
3abf791ab8
commit
220d327ee0
1 changed files with 2 additions and 2 deletions
|
|
@ -991,7 +991,7 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
|
|||
RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess);
|
||||
if (result != Success) {
|
||||
pDraw->pScreen->DestroyPixmap(pMap);
|
||||
return result;
|
||||
break;
|
||||
}
|
||||
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
|
||||
shmdesc->refcnt++;
|
||||
|
|
@ -1008,7 +1008,7 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
|
|||
}
|
||||
}
|
||||
|
||||
if (result == BadAlloc) {
|
||||
if (result != Success) {
|
||||
while (j--)
|
||||
FreeResource(newPix->info[j].id, RT_NONE);
|
||||
free(newPix);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue