]> granicus.if.org Git - graphviz/commitdiff
Memory for nodes and edges wasn't being freed in agdelnode and agdeledge.
authorerg <devnull@localhost>
Thu, 16 Apr 2009 16:49:40 +0000 (16:49 +0000)
committererg <devnull@localhost>
Thu, 16 Apr 2009 16:49:40 +0000 (16:49 +0000)
lib/cgraph/edge.c

index f0c6615b0e2924b2289825e549319d1625ea5126..fe1b1899019a9e96f899e8c56c3c252c78f4ef2d 100644 (file)
@@ -355,8 +355,7 @@ int agdeledge(Agraph_t * g, Agedge_t * e)
        agrecclose((Agobj_t *) e);
        agfreeid(g, AGEDGE, AGID(e));
     }
-    if (agapply
-       (g, (Agobj_t *) e, (agobjfn_t) agdeledgeimage, NILedge, FALSE)) {
+    if (agapply (g, (Agobj_t *) e, (agobjfn_t) agdeledgeimage, NILedge, FALSE) == SUCCESS) {
        agfree(g, e);
        return SUCCESS;
     } else