Fix memoryleak on failure to load font
This commit is contained in:
parent
4d164f3083
commit
fd8a33c8a4
@ -772,6 +772,7 @@ font_load (const char *pattern)
|
||||
ret->height = ret->ascent + ret->descent;
|
||||
} else {
|
||||
fprintf(stderr, "Could not load font %s\n", pattern);
|
||||
free(ret);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user