summaryrefslogtreecommitdiff
path: root/python/ovs
diff options
context:
space:
mode:
authorEric Lapointe <elapointe@corsa.com>2018-10-31 12:11:42 -0400
committerBen Pfaff <blp@ovn.org>2018-10-31 10:34:17 -0700
commite120ff1f8e4dbb0b889b26e0be082376a32090bc (patch)
tree71af8520ac011c2248dab0251ebc855fb5ceb873 /python/ovs
parent875894dad4aa3fc0c410ea6755878875195571c1 (diff)
downloadopenvswitch-e120ff1f8e4dbb0b889b26e0be082376a32090bc.tar.gz
python-c-ext: Fix memory leak in Parser_finish
The memory returned by json_parser_finish needs to be freed by the caller. Signed-off-by: Eric Lapointe <elapointe@corsa.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'python/ovs')
-rw-r--r--python/ovs/_json.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/ovs/_json.c b/python/ovs/_json.c
index 8b8402025..ef7bb4b8e 100644
--- a/python/ovs/_json.c
+++ b/python/ovs/_json.c
@@ -170,6 +170,7 @@ Parser_finish(json_ParserObject * self)
json = json_parser_finish(self->_parser);
self->_parser = NULL;
obj = json_to_python(json);
+ json_destroy(json);
return obj;
}