From: Matthew Fernandez Date: Sat, 10 Sep 2022 14:54:18 +0000 (-0700) Subject: dotgen cloneNode: fix memory leak X-Git-Tag: 6.0.2~45^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae4d2ca0c78a78d045a334b8bd6082249ceb75d9;p=graphviz dotgen cloneNode: fix memory leak --- diff --git a/lib/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index c285800d9..2cac2a95c 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -987,6 +987,7 @@ static node_t *cloneNode(graph_t *g, node_t *orign) { char* buf = N_GNEW(lbllen+3,char); sprintf (buf, "{%s}", ND_label(orign)->text); agset (n, "label", buf); + free(buf); } return n;