From 79cb50e4c4e88921b7f97da5431641cc842c19f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkki=20Sepp=C3=A4l=C3=A4?= Date: Mon, 31 Jan 2011 14:01:59 +0200 Subject: ximcp/imRmAttr: Handle leaking missing_list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed memory leak by adding Xfree and initializing missing_list with NULL Variable "missing_list" goes out of scope Reviewed-by: Alan Coopersmith Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Erkki Seppälä Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/imRmAttr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nx-X11/lib') diff --git a/nx-X11/lib/X11/imRmAttr.c b/nx-X11/lib/X11/imRmAttr.c index 09521653d..fcb347caa 100644 --- a/nx-X11/lib/X11/imRmAttr.c +++ b/nx-X11/lib/X11/imRmAttr.c @@ -316,7 +316,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; @@ -350,6 +350,7 @@ _XimAttributeToValue( } Xfree(base_name); + Xfree(missing_list); *((XFontSet *)value) = rep; break; } -- cgit v1.2.3