Fix some Coverity-detected issues.

This commit is contained in:
Michael R Sweet
2021-10-01 11:38:04 -04:00
parent 85bfab49ab
commit d1e8c966ed
6 changed files with 13 additions and 4 deletions

3
ttf.c
View File

@@ -513,7 +513,8 @@ ttfDelete(ttf_t *font) // I - Font
return;
// Close the font file...
close(font->fd);
if (font->fd >= 0)
close(font->fd);
// Free all memory used...
free(font->copyright);