2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

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>
This commit is contained in:
Eric Lapointe
2018-10-31 12:11:42 -04:00
committed by Ben Pfaff
parent 875894dad4
commit e120ff1f8e

View File

@@ -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;
}