From 29b2455761bd253981a2f7ba1118fbdecfd43149 Mon Sep 17 00:00:00 2001 From: glx Date: Wed, 28 Mar 2007 14:31:52 +0000 Subject: (svn r9519) -Fix r7406 (revert r9518): free the malloced variable, not a pointer to that variable. Also free it if there's any error. --- src/fontcache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/fontcache.cpp b/src/fontcache.cpp index 47eaf9284..36a0c6523 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -146,11 +146,11 @@ static FT_Error GetFontByFaceName(const char *font_name, FT_Face *face) } while ((FT_Long)++index != (*face)->num_faces); -#if defined(UNICODE) - free(font_path); -#endif folder_error: registry_no_font_found: +#if defined(UNICODE) + free(font_namep); +#endif RegCloseKey(hKey); return err; } -- cgit v1.2.3-70-g09d2