mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fix potential memory leak in main.c
This commit is contained in:
parent
1ce1a40f94
commit
f9646a0c14
@ -1,3 +1,7 @@
|
||||
2014-11-19 Darshit Shah <darnir@gmail.com>
|
||||
|
||||
* main.c (format_and_print_line): Fix potential memory leak
|
||||
|
||||
2014-11-19 Darshit Shah <darnir@gmail.com>
|
||||
|
||||
* utils.c (compile_posix_regex): Fix memory leak due to unfreed regex
|
||||
|
@ -891,7 +891,10 @@ format_and_print_line (const char *prefix, const char *line,
|
||||
remaining_chars = line_length - TABULATION;
|
||||
}
|
||||
if (printf ("%s ", token) < 0)
|
||||
{
|
||||
xfree_null (line_dup);
|
||||
return -1;
|
||||
}
|
||||
remaining_chars -= strlen (token) + 1; /* account for " " */
|
||||
token = strtok (NULL, " ");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user