[PATCH 04/32] [libx11] Variable "fs" not freed or pointed-to in function "get_prop_name"
Erkki Seppälä
erkki.seppala at vincit.fi
Wed Jan 26 23:53:47 PST 2011
Fixed a missing call to XFreeFont
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
---
src/xlibi18n/XDefaultOMIF.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/xlibi18n/XDefaultOMIF.c b/src/xlibi18n/XDefaultOMIF.c
index bc6b1b9..bb3986a 100644
--- a/src/xlibi18n/XDefaultOMIF.c
+++ b/src/xlibi18n/XDefaultOMIF.c
@@ -398,7 +398,10 @@ get_font_name(
if (fs == NULL) return NULL;
prop_name = get_prop_name(dpy, fs);
- if (prop_name == NULL) return NULL;
+ if (prop_name == NULL) {
+ XFreeFont(dpy, fs);
+ return NULL;
+ }
name = (char*) Xmalloc(strlen(prop_name) + 1);
if (name)
--
1.7.0.4
More information about the xorg-devel
mailing list