cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Weird crash in multi_socket()

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Sun, 10 Sep 2006 18:34:32 -0500

> Please try with the latest CVS now.

Yes, that's much better!

I'm still running into a problem where Curl_disconnect
sometimes gets a NULL connectdata - the comment in url.c
on line 1693 says it's OK for conn to be NULL, but too late,
the line above already dereferenced the pointer.

This patch seems to fix the problem...

--- url.c.OLD 2006-09-10 18:18:43.246540000 -0500
+++ url.c.NEW 2006-09-10 18:19:54.022780376 -0500
@@ -1688,9 +1688,10 @@

 CURLcode Curl_disconnect(struct connectdata *conn)
 {
- struct SessionHandle *data = conn->data;
+ struct SessionHandle *data;
   if(!conn)
     return CURLE_OK; /* this is closed and fine already */
+ data = conn->data;

 #if defined(CURLDEBUG) && defined(AGGRESIVE_TEST)
   /* scan for DNS cache entries still marked as in use */
Received on 2006-09-11