From 3c4b1b1ca9dc65dc7838e80b2c353bf854b5aebf Mon Sep 17 00:00:00 2001 From: erg Date: Thu, 17 Dec 2009 21:59:31 +0000 Subject: [PATCH] Fix (kind of) bug 1835 --- lib/neatogen/constraint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/neatogen/constraint.c b/lib/neatogen/constraint.c index 049d9d3f5..bfacb39b4 100644 --- a/lib/neatogen/constraint.c +++ b/lib/neatogen/constraint.c @@ -832,7 +832,7 @@ static pointf *mkOverlapSet(info * nl, int nn, int *cntp) pointf pt; if (cnt == sz) { sz += nn; - S = realloc(S, sizeof(pointf) * (sz + 1)); + S = RALLOC(sz + 1, S, pointf); } if (p->pos.x == q->pos.x) pt.x = HUGE_VAL; @@ -855,7 +855,7 @@ static pointf *mkOverlapSet(info * nl, int nn, int *cntp) p++; } - S = realloc(S, sizeof(pointf) * (cnt + 1)); + S = RALLOC(cnt + 1, S, pointf); *cntp = cnt; return S; } -- 2.40.0