Fix memoryleak on failure to load font

This commit is contained in:
krypt-n 2015-11-15 22:41:53 +01:00
parent 4d164f3083
commit fd8a33c8a4
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}