If AllocGrab() fails to set up grab, don't copy to a NULL grab
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Tue, 7 Jan 2014 01:10:38 +0000 (17:10 -0800)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 9 Jan 2014 03:36:29 +0000 (13:36 +1000)
commit3a113815a0cc86d64789494e905da9778174f738
tree8531ce0ec57e799c2e9aadd9e1fcb76fe474574e
parent2ea973e12f5d954211e1d10085a4c74581b43aca
If AllocGrab() fails to set up grab, don't copy to a NULL grab

If either the initial calloc or the xi2mask_new fails, grab is NULL,
but if a src grab is passed in, it was always being written to by
CopyGrab (and if that failed, dereferenced again in teardown).

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
dix/grabs.c