From 5579800bac75674782796c99fc336d188d16b648 Mon Sep 17 00:00:00 2001 From: erg Date: Mon, 25 Jun 2007 17:49:46 +0000 Subject: [PATCH] Fix use of ZALLOC macro. --- lib/common/labels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common/labels.c b/lib/common/labels.c index 44b41d324..5ea09e2f9 100644 --- a/lib/common/labels.c +++ b/lib/common/labels.c @@ -23,9 +23,9 @@ static void storeline(graph_t *g, textlabel_t *lp, char *line, char terminator) { pointf size; textpara_t *para; + int oldsz = lp->u.txt.nparas + 1; - lp->u.txt.para = - ZALLOC(lp->u.txt.nparas + 2, lp->u.txt.para, textpara_t); + lp->u.txt.para = ZALLOC(oldsz + 1, lp->u.txt.para, textpara_t, oldsz); para = &(lp->u.txt.para[lp->u.txt.nparas]); para->str = line; para->just = terminator; -- 2.40.0