summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@nokia.com>2011-03-25 19:27:17 +0200
committerTiago Vignatti <tiago.vignatti@nokia.com>2011-04-04 15:41:13 +0300
commit623bb34342641811e2151232f1ab4e2ee3d6b871 (patch)
tree36d7ff6cf9849d45503a35533419b468dfd22ff0 /Xi
parentdce2f10cf7bef9929cefadb5088d5b66df43a865 (diff)
xi: fix memory leak in ProcXIQueryDevice
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/xiquerydevice.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index 8b5421130..8b6990491 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;