cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3165129 ] Multiple location headers in redirect causing memory leak

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 25 Jan 2011 09:06:27 +0000

Bugs item #3165129, was opened at 2011-01-25 11:06
Message generated for change (Tracker Item Submitted) made by a5urbanipa1
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3165129&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: client module
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: a5urbanipa1 (a5urbanipa1)
Assigned to: Daniel Stenberg (bagder)
Summary: Multiple location headers in redirect causing memory leak

Initial Comment:
I came across a URL http://www.anwb.nl/verkeer/app/popup_regioverkeerssituatie_amsterdam.nl.html that sends 2 instances of location headers, causing a debugassert in my libcurl (7.21.3, the latest, on debian), or a memory leak in the regular curl application.

Here is the valgrind report:

113 bytes in 2 blocks are definitely lost in loss record 2 of 3
at 0x4023D6E: malloc (vg_replace_malloc.c:207)
by 0x411945F: strdup (in /lib/libc-2.7.so)
by 0x403E7C3: Curl_http_readwrite_headers (in /tmp/curl-7.21.3/inst/lib/libcurl.so.4.2.0)
by 0x4056CCF: Curl_readwrite (in /tmp/curl-7.21.3/inst/lib/libcurl.so.4.2.0)
by 0x4057D97: Curl_do_perform (in /tmp/curl-7.21.3/inst/lib/libcurl.so.4.2.0)
by 0x4058B82: curl_easy_perform (in /tmp/curl-7.21.3/inst/lib/libcurl.so.4.2.0)
by 0x80512C5: main (in /tmp/curl-7.21.3/inst/bin/curl)

113 bytes in 2 blocks are definitely lost in loss record 3 of 3
at 0x4023D6E: malloc (vg_replace_malloc.c:207)
by 0x4039CA6: Curl_copy_header_value (in /tmp/curl-7.21.3/inst/lib/libcurl.so.4.2.0)
by 0x403E798: Curl_http_readwrite_headers (in /tmp/curl-7.21.3/inst/lib/libcurl.so.4.2.0)
by 0x4056CCF: Curl_readwrite (in /tmp/curl-7.21.3/inst/lib/libcurl.so.4.2.0)
by 0x4057D97: Curl_do_perform (in /tmp/curl-7.21.3/inst/lib/libcurl.so.4.2.0)
by 0x4058B82: curl_easy_perform (in /tmp/curl-7.21.3/inst/lib/libcurl.so.4.2.0)
by 0x80512C5: main (in /tmp/curl-7.21.3/inst/bin/curl)

In order to reproduce the problem you'd have to build a redirect command with multiple location headers.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3165129&group_id=976
Received on 2011-01-25

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET