aboutsummaryrefslogtreecommitdiff
path: root/libX11/modules/im/ximcp/imRmAttr.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-15 14:48:46 +0000
committermarha <marha@users.sourceforge.net>2011-04-15 14:48:46 +0000
commit71372d36e1a3f0230b88808f70d35446fda12260 (patch)
tree205982f029074be1167820e69891d8332e0a8df2 /libX11/modules/im/ximcp/imRmAttr.c
parent019fc27ce6dc2a1809107be10d4deb80e0fa436b (diff)
downloadvcxsrv-71372d36e1a3f0230b88808f70d35446fda12260.tar.gz
vcxsrv-71372d36e1a3f0230b88808f70d35446fda12260.tar.bz2
vcxsrv-71372d36e1a3f0230b88808f70d35446fda12260.zip
xserver xkeyboard-config libX11 mesa git update 15 April 2011
Diffstat (limited to 'libX11/modules/im/ximcp/imRmAttr.c')
-rw-r--r--libX11/modules/im/ximcp/imRmAttr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libX11/modules/im/ximcp/imRmAttr.c b/libX11/modules/im/ximcp/imRmAttr.c
index 7503905b2..27dcbc9cd 100644
--- a/libX11/modules/im/ximcp/imRmAttr.c
+++ b/libX11/modules/im/ximcp/imRmAttr.c
@@ -1433,8 +1433,10 @@ _XimGetAttributeID(
bzero((char *)res, res_len);
values_len = sizeof(XIMValuesList) + (sizeof(char **) * n) + names_len;
- if (!(tmp = (XPointer)Xmalloc(values_len)))
+ if (!(tmp = (XPointer)Xmalloc(values_len))) {
+ Xfree(res);
return False;
+ }
bzero(tmp, values_len);
values_list = (XIMValuesList *)tmp;
@@ -1480,8 +1482,10 @@ _XimGetAttributeID(
bzero((char *)res, res_len);
values_len = sizeof(XIMValuesList) + (sizeof(char **) * n) + names_len;
- if (!(tmp = (XPointer)Xmalloc(values_len)))
+ if (!(tmp = (XPointer)Xmalloc(values_len))) {
+ Xfree(res);
return False;
+ }
bzero(tmp, values_len);
values_list = (XIMValuesList *)tmp;