]> granicus.if.org Git - graphviz/commitdiff
fix premature free()
authorellson <devnull@localhost>
Fri, 28 Sep 2007 22:23:20 +0000 (22:23 +0000)
committerellson <devnull@localhost>
Fri, 28 Sep 2007 22:23:20 +0000 (22:23 +0000)
lib/common/shapes.c

index 5eb163b0847f4f2d630d6e9a5f4b7df8c0ef5bb0..7f77b54b58528573e642f4fbde3d28d968bae15f 100644 (file)
@@ -554,7 +554,6 @@ void round_corners(GVJ_t * job, char* fillc, char* penc, pointf * AF,
        D[10] = AF[2];
        D[11] = AF[3];
        gvrender_polygon(job, D, sides + 8, style & FILLED);
-       free(D);
 
        /* Draw the internal vertices. */
        C[0] = D[2];
@@ -571,6 +570,8 @@ void round_corners(GVJ_t * job, char* fillc, char* penc, pointf * AF,
        C[2].y = B[6].y + (B[3].y - B[4].y);
        C[3] = D[9];
        gvrender_polyline(job, C, 4);
+
+       free(D);
        break;
     }
     free(B);