[PATCH 07/16] Fix memory leak on _XimCommitRecv error path.

Ander Conselvan de Oliveira ander.conselvan-de-oliveira at nokia.com
Wed Mar 30 06:12:00 PDT 2011


Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
---
 modules/im/ximcp/imDefLkup.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c
index f818faa..996d36a 100644
--- a/modules/im/ximcp/imDefLkup.c
+++ b/modules/im/ximcp/imDefLkup.c
@@ -691,8 +691,10 @@ _XimCommitRecv(
 	    return False;
 
 	if (!(_XimProcCommit(ic, (BYTE *)&buf_s[5],
-			 		(int)buf_s[4], &string, &string_len)))
+					(int)buf_s[4], &string, &string_len))) {
+	    Xfree(keysym);
 	    return False;
+	}
     }
 
     if (!(_XimRegCommitInfo(ic, string, string_len, keysym, keysym_len))) {
-- 
1.7.0.4



More information about the xorg-devel mailing list