(svn r9519) -Fix r7406 (revert r9518): free the malloced variable, not a pointer to that variable. Also free it if there's any error.
authorglx
Wed, 28 Mar 2007 14:31:52 +0000
changeset 6389 e1331b03c6ce
parent 6388 278514553a20
child 6390 802629b3c7f1
(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
--- a/src/fontcache.cpp	Wed Mar 28 09:27:38 2007 +0000
+++ b/src/fontcache.cpp	Wed Mar 28 14:31:52 2007 +0000
@@ -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;
 }