ref: f188158f1cd94842b6b0c355a359b2e4d4c4b0e4
parent: e08cc065177138fe821abb84dc6381fd0400e944
author: mischief <[email protected]>
date: Sun Dec 28 17:46:39 EST 2014
libmemdraw: fix fd leak in openmemsubfont and memory leak in freememsubfont
--- a/sys/src/libmemdraw/openmemsubfont.c
+++ b/sys/src/libmemdraw/openmemsubfont.c
@@ -41,6 +41,7 @@
free(fc);
goto Err;
}
+ close(fd);
free(p);
return sf;
Err:
--- a/sys/src/libmemdraw/subfont.c
+++ b/sys/src/libmemdraw/subfont.c
@@ -30,5 +30,6 @@
return;
free(f->info); /* note: f->info must have been malloc'ed! */
freememimage(f->bits);
+ free(f->name);
free(f);
}