diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-11-19 14:22:01 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-11-19 14:22:01 +0000 |
commit | 4b3ae5e1575fd40d3ca969fda2f23e46182cf0b8 (patch) | |
tree | f0e3a2b4f9ab2a241b7003378e14d5ae7404ca20 /lib | |
parent | 797bc8504c0c1d718b088dca0622d920e3c6fcff (diff) |
- Christian Krause reported and fixed a memory leak that would occur with HTTP
GSS/kerberos authentication (http://curl.haxx.se/bug/view.cgi?id=2284386)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c index 85d99a057..1b20c37e7 100644 --- a/lib/http.c +++ b/lib/http.c @@ -458,6 +458,10 @@ CURLcode Curl_http_auth_act(struct connectdata *conn) } if(pickhost || pickproxy) { + /* In case this is GSS auth, the newurl field is already allocated so + we must make sure to free it before allocating a new one. As figured + out in bug #2284386 */ + Curl_safefree(data->req.newurl); data->req.newurl = strdup(data->change.url); /* clone URL */ if(!data->req.newurl) return CURLE_OUT_OF_MEMORY; |