changeset 6389:cb3cab32710f draft

(svn r9519) -Fix r7406 (revert r9518): free the malloced variable, not a pointer to that variable. Also free it if there's any error.
author glx <glx@openttd.org>
date Wed, 28 Mar 2007 14:31:52 +0000
parents b699cfa343dc
children a6b14274ee2e
files src/fontcache.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fontcache.cpp
+++ b/src/fontcache.cpp
@@ -146,11 +146,11 @@
 	} 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;
 }