diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/fontsrv/osx.c | 4 | ||||
-rw-r--r-- | src/cmd/fontsrv/x11.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/fontsrv/osx.c b/src/cmd/fontsrv/osx.c index 18197a23..4d969290 100644 --- a/src/cmd/fontsrv/osx.c +++ b/src/cmd/fontsrv/osx.c @@ -245,8 +245,10 @@ mksubfont(XFont *f, char *name, int lo, int hi, int size, int antialias) if(m == nil) return nil; mc = allocmemimage(Rect(0, 0, x+1, y+1), GREY8); - if(mc == nil) + if(mc == nil){ + freememimage(m); return nil; + } memfillcolor(m, DBlack); memfillcolor(mc, DBlack); fc = malloc((hi+2 - lo) * sizeof fc[0]); diff --git a/src/cmd/fontsrv/x11.c b/src/cmd/fontsrv/x11.c index f106d253..a097ca4d 100644 --- a/src/cmd/fontsrv/x11.c +++ b/src/cmd/fontsrv/x11.c @@ -236,6 +236,7 @@ mksubfont(XFont *xf, char *name, int lo, int hi, int size, int antialias) m1 = allocmemimage(Rect(0, 0, x, y), antialias ? GREY8 : GREY1); memimagedraw(m1, m1->r, m, m->r.min, memopaque, ZP, S); freememimage(m); + freememimage(mc); sf->name = nil; sf->n = hi+1 - lo; |