From 46e6c78b1a89e4774e0f7e0f4d6d0fd060c3897e Mon Sep 17 00:00:00 2001 From: Ander Conselvan de Oliveira Date: Thu, 24 Mar 2011 19:52:05 +0200 Subject: [PATCH] Fix memory leak on _XimCommitRecv error path. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Alan Coopersmith --- modules/im/ximcp/imDefLkup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c index f818faaf..996d36ae 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))) {