cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: 7.12-hostip4

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Fri, 23 Apr 2004 15:48:41 +0200

> My plan is to release 7.11.2 then, and immediately afterwards commit these
> changes.

We should plug the following leak before the release.
Found it by running:
>perl ..\tests\memanalyze.pl memdump
  Open file descriptor created at hostthre.c:325

--- CVS-Latest/lib/hostip.c Wed Apr 21 13:18:42 2004
+++ hostip.c Fri Apr 23 15:38:51 2004
@@ -1531,8 +1531,11 @@
     }
     else
       rc = CURLE_OPERATION_TIMEDOUT;
+ }
+
+ destroy_thread_data(&conn->async);

- destroy_thread_data(&conn->async);
+ if (CURLE_OK != rc) {
     /* close the connection, since we can't return failure here without
        cleaning up this connection properly */
     Curl_disconnect(conn);

I.e. always call destroy_thread_data().

--gv
Received on 2004-04-23