diff options
author | Keith Packard <keithp@keithp.com> | 2011-04-04 11:57:39 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-04-04 11:57:39 -0700 |
commit | c9d89cec1407550cb2568f4cef146c93607bbae6 (patch) | |
tree | f304c31842697512b659b0fa364f7582309d5210 /Xi | |
parent | a52049de2f846fe984d4db5ac8d2c1826c7b2d0b (diff) | |
parent | bc61787a20e7683cbc4dfa45fe855da98a8c0cd0 (diff) |
Merge remote-tracking branch 'vignatti/for-keith'
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 8 | ||||
-rw-r--r-- | Xi/getprop.c | 2 | ||||
-rw-r--r-- | Xi/getselev.c | 6 | ||||
-rw-r--r-- | Xi/xiquerydevice.c | 4 |
4 files changed, 13 insertions, 7 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 5b207bc4b..18803c95e 100644 --- a/Xi/exevents.c +++ b/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 diff --git a/Xi/getprop.c b/Xi/getprop.c index ba98fc80f..5e102627d 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -115,7 +115,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) if ((others = wOtherInputMasks(pWin)) != 0) { for (i = 0; i < EMASKSIZE; i++) - tbuf = ClassFromMask(NULL, others->dontPropagateMask[i], i, + ClassFromMask(NULL, others->dontPropagateMask[i], i, &count, COUNT); if (count) { rep.count = count; diff --git a/Xi/getselev.c b/Xi/getselev.c index d63b661cd..7304738b3 100644 --- a/Xi/getselev.c +++ b/Xi/getselev.c @@ -118,13 +118,13 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) if ((pOthers = wOtherInputMasks(pWin)) != 0) { for (others = pOthers->inputClients; others; others = others->next) for (i = 0; i < EMASKSIZE; i++) - tclient = ClassFromMask(NULL, others->mask[i], i, + ClassFromMask(NULL, others->mask[i], i, &rep.all_clients_count, COUNT); for (others = pOthers->inputClients; others; others = others->next) if (SameClient(others, client)) { for (i = 0; i < EMASKSIZE; i++) - tclient = ClassFromMask(NULL, others->mask[i], i, + ClassFromMask(NULL, others->mask[i], i, &rep.this_client_count, COUNT); break; } @@ -152,8 +152,8 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) if (total_length) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, total_length, buf); - free(buf); } + free(buf); return Success; } diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c index 6eea72410..a768d499c 100644 --- a/Xi/xiquerydevice.c +++ b/Xi/xiquerydevice.c @@ -107,8 +107,10 @@ ProcXIQueryDevice(ClientPtr client) } info = calloc(1, len); - if (!info) + if (!info) { + free(skip); return BadAlloc; + } memset(&rep, 0, sizeof(xXIQueryDeviceReply)); rep.repType = X_Reply; |