cURL / Mailing Lists / curl-library / Single Mail

curl-library

leak in hostthre.c

From: Gisle Vanem <giva_at_bgnett.no>
Date: Tue, 03 Apr 2007 14:02:15 +0200

>curl -v www.no-such-name.com
curl: (6) Could not resolve host: www.no-such-name.com; No data record of requested type

This is (afaics) the result of EAI_NODATA from getaddrinfo(). But:

>.\tests\memanalyze.pl memdebug
Leak detected: memory still allocated: 21 bytes
At b777a8, there's 21 bytes.
 allocated by hostthre.c:233

I cannot see how destroy_thread_sync_data() wouldn't be called in
this case. It called at line 392 (I built with ENABLE_IPV6).
The code in hostthre.c has changed a lot since I first worked on it.

Curiously, if the return is "Host not found" (as for www.no-such-name.no),
the leak doesn't happen !? Anybody else using curl on Window who can
confirm this?

All this with a fresh cvs checkout.

--gv
Received on 2007-04-03