diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-08 11:13:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-08 11:13:23 +0000 |
commit | cabe82af1b45e7e7798dc4e87efd03936aba0f3f (patch) | |
tree | 3c3942ffca58423bfd02799c8868ee940805157e /sys/dev/wsfont/wsfont.c | |
parent | 0a781cacb00fa6ece74e451af31d8c8432a8e6f6 (diff) |
sizes for free(); checked by semarie
Diffstat (limited to 'sys/dev/wsfont/wsfont.c')
-rw-r--r-- | sys/dev/wsfont/wsfont.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/wsfont/wsfont.c b/sys/dev/wsfont/wsfont.c index 65e64f5aff7..67249fbc5ad 100644 --- a/sys/dev/wsfont/wsfont.c +++ b/sys/dev/wsfont/wsfont.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsfont.c,v 1.40 2015/03/14 03:38:50 jsg Exp $ */ +/* $OpenBSD: wsfont.c,v 1.41 2015/09/08 11:13:22 deraadt Exp $ */ /* $NetBSD: wsfont.c,v 1.17 2001/02/07 13:59:24 ad Exp $ */ /*- @@ -338,8 +338,9 @@ wsfont_rotate_internal(struct wsdisplay_font *font) * If we seem to have rotated this font already, drop the * new one... */ - free(newbits, M_DEVBUF, 0); - free(newfont, M_DEVBUF, 0); + free(newbits, M_DEVBUF, + font->numchars * newstride * font->fontwidth); + free(newfont, M_DEVBUF, sizeof *font); newfont = NULL; } |