diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-01-07 21:03:54 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-01-07 21:03:54 +0000 |
commit | eb8a728a2ecb1ac5b786710c85f87504f32554f8 (patch) | |
tree | eae28e9df9d027ff2f5eba1dbb49c2ac72d0ab03 | |
parent | 2a0a5838c9334e2e30548b44810b594c9cdbe106 (diff) | |
download | mandoc-eb8a728a2ecb1ac5b786710c85f87504f32554f8.tar.gz |
This code wasted memory by allocating sizeof(enum termfont *)
where only sizeof(enum termfont) is needed.
Fixes CID 1288941. From christos@ via wiz@, both at NetBSD.
-rw-r--r-- | term.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -365,7 +365,7 @@ term_fontpush(struct termp *p, enum termfont f) if (++p->fonti == p->fontsz) { p->fontsz += 8; p->fontq = mandoc_reallocarray(p->fontq, - p->fontsz, sizeof(enum termfont *)); + p->fontsz, sizeof(*p->fontq)); } p->fontq[p->fonti] = f; } |