Signed-off-by: Tiago Vignatti <[email protected]>
---
Xi/exevents.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index c7089bb..6923f6a 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1631,14 +1631,18 @@ AddExtensionClient(WindowPtr pWin, ClientPtr client,
Mask mask, int mskidx)
if (!others)
return BadAlloc;
if (!pWin->optional->inputMasks && !MakeInputMasks(pWin))
- return BadAlloc;
+ goto bail;
others->mask[mskidx] = mask;
others->resource = FakeClientID(client->index);
others->next = pWin->optional->inputMasks->inputClients;
pWin->optional->inputMasks->inputClients = others;
if (!AddResource(others->resource, RT_INPUTCLIENT, (pointer) pWin))
- return BadAlloc;
+ goto bail;
return Success;
+
+bail:
+ free(others);
+ return BadAlloc;
}
static Bool
--
1.7.0.4
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel