mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
fix memory leak
This commit is contained in:
parent
a5c6ae8f28
commit
c2bb6bc875
@ -3,6 +3,10 @@
|
||||
* openssl.c (ssl_init) [! OPENSSL_NO_SSL3]: Add guard for OpenSSL
|
||||
without SSLv3.
|
||||
|
||||
2014-10-29 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||
|
||||
* http.c (gethttp): fix memory leak
|
||||
|
||||
2014-10-29 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||
|
||||
* http.c (gethttp): use CLOSE_INVALIDATE instead of fd_close
|
||||
|
@ -2071,6 +2071,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
||||
request_free (req);
|
||||
return HERR;
|
||||
}
|
||||
xfree_null(hs->message);
|
||||
hs->message = xstrdup (message);
|
||||
resp_free (resp);
|
||||
xfree (head);
|
||||
@ -2249,6 +2250,7 @@ read_header:
|
||||
goto read_header;
|
||||
}
|
||||
|
||||
xfree_null(hs->message);
|
||||
hs->message = xstrdup (message);
|
||||
if (!opt.server_response)
|
||||
logprintf (LOG_VERBOSE, "%2d %s\n", statcode,
|
||||
@ -2423,6 +2425,7 @@ read_header:
|
||||
xfree (head);
|
||||
xfree (auth_stat);
|
||||
xfree (hs->message);
|
||||
hs->message = NULL;
|
||||
goto retry_with_auth;
|
||||
}
|
||||
else
|
||||
@ -3415,6 +3418,7 @@ Remote file exists.\n\n"));
|
||||
count = 0; /* the retrieve count for HEAD is reset */
|
||||
xfree_null (hstat.message);
|
||||
xfree_null (hstat.error);
|
||||
hstat.message = NULL;
|
||||
continue;
|
||||
} /* send_head_first */
|
||||
} /* !got_head */
|
||||
|
Loading…
Reference in New Issue
Block a user