mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Fix two memory leaks.
This commit is contained in:
parent
2a6eb83fb4
commit
fd25a6425c
@ -398,6 +398,9 @@ start_conversion:
|
|||||||
{
|
{
|
||||||
debug(0, L"%d %d", in_len, out_len);
|
debug(0, L"%d %d", in_len, out_len);
|
||||||
debug(0, L"Error while converting from to string");
|
debug(0, L"Error while converting from to string");
|
||||||
|
|
||||||
|
/* Terminate the output string. */
|
||||||
|
free(out);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +276,10 @@ _xdg_mime_magic_parse_header(FILE *magic_file, XdgMimeMagicMatch *match)
|
|||||||
|
|
||||||
buffer = _xdg_mime_magic_read_to_newline(magic_file, &end_of_file);
|
buffer = _xdg_mime_magic_read_to_newline(magic_file, &end_of_file);
|
||||||
if (end_of_file)
|
if (end_of_file)
|
||||||
|
{
|
||||||
|
free(buffer);
|
||||||
return XDG_MIME_MAGIC_EOF;
|
return XDG_MIME_MAGIC_EOF;
|
||||||
|
}
|
||||||
|
|
||||||
end_ptr = buffer;
|
end_ptr = buffer;
|
||||||
while (*end_ptr != ']' && *end_ptr != '\000' && *end_ptr != '\n')
|
while (*end_ptr != ']' && *end_ptr != '\000' && *end_ptr != '\n')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user