diff options
author | David King <dking@redhat.com> | 2021-05-20 11:37:56 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2021-06-18 14:28:05 +0000 |
commit | 9bef18a7005926986fbaa7c103f126c49901fe34 (patch) | |
tree | 9f20dce2bfb33096a51b3cdf184d86d1f2362c23 /girepository | |
parent | 91ce47665818eae63d3f32185dd6c18d5a9a0b34 (diff) | |
download | gobject-introspection-9bef18a7005926986fbaa7c103f126c49901fe34.tar.gz |
girepository: Fix leak in _g_ir_parser_parse_file
Found by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=1938731
Diffstat (limited to 'girepository')
-rw-r--r-- | girepository/girparser.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c index ad676e33..f62b1de6 100644 --- a/girepository/girparser.c +++ b/girepository/girparser.c @@ -3672,7 +3672,11 @@ _g_ir_parser_parse_file (GIrParser *parser, *dash = '\0'; if (!g_file_get_contents (filename, &buffer, &length, error)) - return NULL; + { + g_free (namespace); + + return NULL; + } module = _g_ir_parser_parse_string (parser, namespace, filename, buffer, length, error); |