]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Fix small memory leak when using command_py.c 1333/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 17 Oct 2017 13:22:41 +0000 (09:22 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 17 Oct 2017 13:22:41 +0000 (09:22 -0400)
When free'ing memory associated with the wgraph, also
free memory malloced during the initialization.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/command_py.c

index 755cfb55ce8f65cbc79b9def641c8cf5b7d9dd96..58b7982665571a927b3cb0951ed622b2573f95a9 100644 (file)
@@ -250,6 +250,8 @@ static PyObject *graph_parse(PyTypeObject *type, PyObject *args,
 static void graph_wrap_free(void *arg)
 {
        struct wrap_graph *wgraph = arg;
+
+       graph_delete_graph(wgraph->graph);
        free(wgraph->nodewrappers);
        free(wgraph->definition);
 }