cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-846893 ] memory leak in conn->range ?

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 21 Nov 2003 13:08:00 -0800

Bugs item #846893, was opened at 2003-11-21 16:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=846893&group_id=976

Category: libcurl
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Gaz Iqbal (gaz)
Assigned to: Daniel Stenberg (bagder)
Summary: memory leak in conn->range ?

Initial Comment:
When reusing a connection with a range string alloc'ed,
the old connection is free'ed without explicitly freeing
the range string resulting in a memory leak.

libcurl version : 7.10.7
url.c
line 2888

in function :

static CURLcode CreateConnection(struct SessionHandle
*data, struct connectdata **in_connect, struct
Curl_dns_entry **addr,bool *async)

I added the following to fix this.

if(old_conn->bits.rangestringalloc)
    free(old_conn->range);

before

free(old_conn);

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=846893&group_id=976

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-11-21