mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 06:32:10 +01:00
Don't forget to free resources in an early return
This commit is contained in:
parent
3dc34de0ff
commit
83d34f6309
@ -272,7 +272,10 @@ _xdg_mime_magic_parse_header (FILE *magic_file, XdgMimeMagicMatch *match)
|
||||
|
||||
buffer = (char *)_xdg_mime_magic_read_to_newline (magic_file, &end_of_file);
|
||||
if (end_of_file)
|
||||
return XDG_MIME_MAGIC_EOF;
|
||||
{
|
||||
free (buffer);
|
||||
return XDG_MIME_MAGIC_EOF;
|
||||
}
|
||||
|
||||
end_ptr = buffer;
|
||||
while (*end_ptr != ']' && *end_ptr != '\000' && *end_ptr != '\n')
|
||||
|
Loading…
x
Reference in New Issue
Block a user