diff options
Diffstat (limited to 'composite')
-rw-r--r-- | composite/compext.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/composite/compext.c b/composite/compext.c index 8641eff5e..e4821c5fc 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -803,6 +803,7 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client) RT_WINDOW, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->window; + free(overlayWin); return rc; } pScreen = pWin->drawable.pScreen; @@ -812,8 +813,10 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client) * interest in the overlay window */ pOc = compCreateOverlayClient(pScreen, client); - if (pOc == NULL) + if (pOc == NULL) { + free(overlayWin); return BadAlloc; + } /* * Make sure the overlay window exists @@ -822,6 +825,7 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client) if (cs->pOverlayWin == NULL) if (!compCreateOverlayWindow(pScreen)) { FreeResource(pOc->resource, RT_NONE); + free(overlayWin); return BadAlloc; } @@ -831,6 +835,7 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client) DixGetAttrAccess); if (rc != Success) { FreeResource(pOc->resource, RT_NONE); + free(overlayWin); return rc; } } |