girepository: Fix leak in _g_ir_parser_parse_file

Found by Coverity.

https://bugzilla.redhat.com/show_bug.cgi?id=1938731
This commit is contained in:
David King 2021-05-20 11:37:56 +01:00 committed by Emmanuele Bassi
parent 62b1ebd822
commit 4e3ab408f1

View File

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