summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>2011-03-24 19:52:05 +0200
committerAnder Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>2011-04-13 11:05:59 +0300
commit46e6c78b1a89e4774e0f7e0f4d6d0fd060c3897e (patch)
tree487b76805ad07eeab539461dd850867bd8b6d16b
parent0ace642a2d47265f01450bfa2b2fd48eb6956a83 (diff)
Fix memory leak on _XimCommitRecv error path.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--modules/im/ximcp/imDefLkup.c4
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))) {