]> granicus.if.org Git - graphviz/commitdiff
Fix (kind of) bug 1835
authorerg <devnull@localhost>
Thu, 17 Dec 2009 21:59:31 +0000 (21:59 +0000)
committererg <devnull@localhost>
Thu, 17 Dec 2009 21:59:31 +0000 (21:59 +0000)
lib/neatogen/constraint.c

index 049d9d3f5b6e5811620457c427aaaf4423c17864..bfacb39b4d8638896fecbdb7459c221264a08e43 100644 (file)
@@ -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;
 }