mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fix resource leak discovered by Coverity
* src/retr.c (retrieve_url): Don't leak local_file.
This commit is contained in:
parent
6b5acff566
commit
d3504b9261
@ -726,7 +726,7 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
|
||||
char *mynewloc, *proxy;
|
||||
struct url *u = orig_parsed, *proxy_url;
|
||||
int up_error_code; /* url parse error code */
|
||||
char *local_file;
|
||||
char *local_file = NULL;
|
||||
int redirection_count = 0;
|
||||
|
||||
bool method_suspended = false;
|
||||
@ -754,7 +754,7 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
|
||||
|
||||
result = NOCONERROR;
|
||||
mynewloc = NULL;
|
||||
local_file = NULL;
|
||||
xfree(local_file);
|
||||
proxy_url = NULL;
|
||||
|
||||
proxy = getproxy (u);
|
||||
|
Loading…
Reference in New Issue
Block a user