[PATCH v2 07/25] [libx11] Fixed memory leak by adding Xfree and initializing missing_list with NULL
Erkki Seppälä
erkki.seppala at vincit.fi
Mon Jan 31 04:01:59 PST 2011
Variable "missing_list" goes out of scope
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/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 d62dfdb..ae053c9 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;
}
--
1.7.0.4
More information about the xorg-devel
mailing list