summaryrefslogtreecommitdiffstats
path: root/lib/command_py.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-10-17 15:22:41 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-10-17 15:22:41 +0200
commite871b669e12d3d81fe470f2eb937381af7b4aacd (patch)
treee7b2a3329215b383ac81975f022a54b0fbcc122b /lib/command_py.c
parentMerge pull request #1308 from chiragshah6/mdev1 (diff)
downloadfrr-e871b669e12d3d81fe470f2eb937381af7b4aacd.tar.xz
frr-e871b669e12d3d81fe470f2eb937381af7b4aacd.zip
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r--lib/command_py.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/command_py.c b/lib/command_py.c
index 755cfb55c..58b798266 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);
}