mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-11 01:49:50 +00:00
(svn r9519) -Fix r7406 (revert r9518): free the malloced variable, not a pointer to that variable. Also free it if there's any error.
This commit is contained in:
parent
5d3c610ab5
commit
29b2455761
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user