From: Donald Sharp Date: Tue, 17 Oct 2017 13:22:41 +0000 (-0400) Subject: lib: Fix small memory leak when using command_py.c X-Git-Tag: frr-4.0-dev~205^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e871b669e12d3d81fe470f2eb937381af7b4aacd;p=matthieu%2Ffrr.git lib: Fix small memory leak when using command_py.c When free'ing memory associated with the wgraph, also free memory malloced during the initialization. Signed-off-by: Donald Sharp --- diff --git a/lib/command_py.c b/lib/command_py.c index 755cfb55ce..58b7982665 100644 --- a/lib/command_py.c +++ b/lib/command_py.c @@ -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); }