diff options
author | Erkki Seppälä <erkki.seppala@vincit.fi> | 2011-01-31 14:01:59 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-02-01 23:45:45 -0800 |
commit | f9eda19d08c1ea0973dfe0bc10a2519d6fd26cc7 (patch) | |
tree | 82bdaa96916883996603dae2d80c012bf87ea371 /modules | |
parent | 3183269e0979c9dbce9d55d9e03937897dc9fb3b (diff) | |
download | xorg-lib-libX11-f9eda19d08c1ea0973dfe0bc10a2519d6fd26cc7.tar.gz |
ximcp/imRmAttr: Handle leaking missing_list
Fixed memory leak by adding Xfree and initializing missing_list with NULL
Variable "missing_list" goes out of scope
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/im/ximcp/imRmAttr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/im/ximcp/imRmAttr.c b/modules/im/ximcp/imRmAttr.c index 61b732f0..5035df51 100644 --- a/modules/im/ximcp/imRmAttr.c +++ b/modules/im/ximcp/imRmAttr.c @@ -313,7 +313,7 @@ _XimAttributeToValue( INT16 len = data[0]; char *base_name; XFontSet rep = (XFontSet)NULL; - char **missing_list; + char **missing_list = NULL; int missing_count; char *def_string; @@ -347,6 +347,7 @@ _XimAttributeToValue( } Xfree(base_name); + Xfree(missing_list); *((XFontSet *)value) = rep; break; } |