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

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


Fixed memory leak by adding Xfree

Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
---
 modules/im/ximcp/imRm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/im/ximcp/imRm.c b/modules/im/ximcp/imRm.c
index 2e2c31f..fa86979 100644
--- a/modules/im/ximcp/imRm.c
+++ b/modules/im/ximcp/imRm.c
@@ -2841,6 +2841,8 @@ _XimEncodeLocalStatusValue(
 				ic->core.focus_window, &colormap_ret,
 				&count, (Atom)p->value)))
 	    return False;
+
+	Xfree(colormap_ret);
     }
     return True;
 }
-- 
1.7.0.4



More information about the xorg-devel mailing list