[PATCH 03/11] xi: fix memory leak in ProcXIQueryDevice
Tiago Vignatti
tiago.vignatti at nokia.com
Fri Mar 25 11:41:45 PDT 2011
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
Xi/xiquerydevice.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index 8b54211..8b69904 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;
--
1.7.0.4
More information about the xorg-devel
mailing list