diff options
author | Keith Packard <keithp@keithp.com> | 2014-01-22 11:33:53 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-01-22 11:33:53 -0800 |
commit | 25ebb9dbc9df659dec2bf6c27654a5bad2d11f94 (patch) | |
tree | 196d71c9136106382bc74302e4d3f88523812205 /dix/events.c | |
parent | 409e8e29fbe16122ba5a4249256fc56e2e68ea93 (diff) | |
parent | 71baa466b1f6b02fe503f9a3089b7b9d61aa0f80 (diff) |
Merge remote-tracking branch 'whot/for-keith'
Diffstat (limited to 'dix/events.c')
-rw-r--r-- | dix/events.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dix/events.c b/dix/events.c index ddbd4d281..f05dada3d 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3961,6 +3961,8 @@ CheckPassiveGrabsOnWindow(WindowPtr pWin, return NULL; tempGrab = AllocGrab(NULL); + if (tempGrab == NULL) + return NULL; /* Fill out the grab details, but leave the type for later before * comparing */ @@ -5056,7 +5058,7 @@ ProcUngrabPointer(ClientPtr client) * @param other_mode GrabModeSync or GrabModeAsync * @param status Return code to be returned to the caller. * - * @returns Success or BadValue. + * @returns Success or BadValue or BadAlloc. */ int GrabDevice(ClientPtr client, DeviceIntPtr dev, @@ -5137,6 +5139,8 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, GrabPtr tempGrab; tempGrab = AllocGrab(NULL); + if (tempGrab == NULL) + return BadAlloc; tempGrab->next = NULL; tempGrab->window = pWin; |