libdraw: fix some memory leaks in font handling

This commit is contained in:
Xiao-Yong Jin 2018-03-20 22:17:57 -05:00 committed by David du Colombier
parent a3ec102dc7
commit dc2a17b95c
5 changed files with 18 additions and 6 deletions

View file

@ -36,6 +36,7 @@ buildfont(Display *d, char *buf, char *name)
if(fnt->name==0 || fnt->cache==0 || fnt->subf==0){
Err2:
free(fnt->name);
free(fnt->namespec);
free(fnt->cache);
free(fnt->subf);
free(fnt->sub);