[PATCH 11/32] [libx11] Variable "colormap_ret" goes out of scope

Erkki Seppälä erkki.seppala at vincit.fi
Wed Jan 26 23:53:54 PST 2011


Fixed memory leak by adding Xfree

Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
---
 modules/im/ximcp/imRmAttr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/modules/im/ximcp/imRmAttr.c b/modules/im/ximcp/imRmAttr.c
index ae053c9..5035df5 100644
--- a/modules/im/ximcp/imRmAttr.c
+++ b/modules/im/ximcp/imRmAttr.c
@@ -957,6 +957,7 @@ _XimEncodePreeditValue(
 				&count, (Atom)p->value)))
 	    return False;
 
+	XFree(colormap_ret);
     } else if (res->xrm_name == XrmStringToQuark(XNFontSet)) {
 	int		  list_ret;
 	XFontStruct	**struct_list;
-- 
1.7.0.4



More information about the xorg-devel mailing list