From 448476317f79b3831df7a50ad4a2cfc33bc35043 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Mon, 13 Jul 2009 15:04:57 +0200 Subject: [PATCH] Fix minor memleak (fonts) --- src/fonts.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fonts.c b/src/fonts.c index 08701297..4e1eeeaf 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -121,7 +121,11 @@ void free_fonts(void) { int i; - if ((output_methods & TO_X) == 0 || fontloaded == 0) { + if ((output_methods & TO_X) == 0) { + return; + } + if(fontloaded == 0) { + free(fonts); return; } for (i = 0; i <= font_count; i++) {