mirror of
https://github.com/libretro/RetroArch
synced 2025-03-06 13:13:57 +00:00
Fix possible segfault.
This commit is contained in:
parent
ebd2a4c4c3
commit
f3b685d832
13
gfx/fonts.c
13
gfx/fonts.c
@ -52,11 +52,14 @@ font_renderer_t *font_renderer_new(const char *font_path, unsigned font_size)
|
||||
return handle;
|
||||
|
||||
error:
|
||||
free(handle);
|
||||
if (handle->face)
|
||||
FT_Done_Face(handle->face);
|
||||
if (handle->lib)
|
||||
FT_Done_FreeType(handle->lib);
|
||||
if (handle)
|
||||
{
|
||||
if (handle->face)
|
||||
FT_Done_Face(handle->face);
|
||||
if (handle->lib)
|
||||
FT_Done_FreeType(handle->lib);
|
||||
free(handle);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user