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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user