cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: Debug-Nondebug more

From: Daniel Stenberg <Daniel.Stenberg_at_haxx.se>
Date: Tue, 13 Jun 2000 10:10:02 +0200 (MET DST)

On Tue, 13 Jun 2000, Luong Dinh Dung wrote:

> Release mode only means no debug. My test programme tried to download a
> Web page without options. In this test, previously in 6 version i used
> curl_urlget(), but now in 7 version i used others like curl-easy-init(),
> curl-easy-perform(),curl-easy-cleanup.

Ah, I found it! Thanks for the details, I free()ed the same pointer twice!
This problem is not present in versions before version 7.

> The test has already downloaded the web page and write it into file, but
> error occurs in curl-easy-cleanup like reported before. In ftp download
> test, there is the same error.

Yes, this will happen on any kind of data. Apply the patch below, or edit the
changes manually:

diff -u -r1.20 url.c
--- url.c 2000/06/08 15:11:39 1.20
+++ url.c 2000/06/13 08:07:05
@@ -233,13 +233,11 @@
   
   void *protocol = data->proto.generic;
 
- /* total session cleanup */
+ /* total session cleanup (frees 'data' as well!)*/
   urlfree(data, TRUE);
 
   if(protocol)
     free(protocol);
-
- free(data);
 
   return CURLE_OK;
 }

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on 2000-06-13

These mail archives are generated by hypermail.

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

File upload with ASP.NET