]> granicus.if.org Git - graphviz/commitdiff
dotgen cloneNode: fix memory leak
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Sep 2022 14:54:18 +0000 (07:54 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 11 Sep 2022 18:53:42 +0000 (11:53 -0700)
lib/dotgen/dotsplines.c

index c285800d9f124697ce72a020dd21c6bfce7e736c..2cac2a95cc1c0a452ffca6ec13541961201ba245 100644 (file)
@@ -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;