Signed-off-by: Ander Conselvan de Oliveira 
<[email protected]>
---
 modules/im/ximcp/imRmAttr.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/im/ximcp/imRmAttr.c b/modules/im/ximcp/imRmAttr.c
index 5035df5..0471f3d 100644
--- a/modules/im/ximcp/imRmAttr.c
+++ b/modules/im/ximcp/imRmAttr.c
@@ -1480,8 +1480,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;
-- 
1.7.0.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to