diff options
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r-- | xorg-server/Xi/exevents.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 5b207bc4b..18803c95e 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1607,14 +1607,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 |