c-ares: fix cancelled resolves
authorDaniel Stenberg <daniel@haxx.se>
Mon, 27 Dec 2010 08:55:13 +0000 (09:55 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 27 Dec 2010 09:01:44 +0000 (10:01 +0100)
commitb6a3e2be8e1bbb183597399c0dcdaa67022b958e
treea92f030833e3bd8d61eda610aa388bc3f87ed582
parent9f64bbd6d88a0a72614bc01ac1842b26a12f9bfd
c-ares: fix cancelled resolves

When built IPv6-enabled, we could do Curl_done() with one of the two
resolves having returned already, so when ares_cancel() is called the
resolve callback ends up doing funny things (sometimes resulting in a
segfault) since it would try to actually store the previous resolve even
though we're shutting down the resolve.

This bug was introduced in commit 8ab137b2bc9630ce so it hasn't been
included in any public release.

Bug: http://curl.haxx.se/bug/view.cgi?id=3145445
Reported by: Pedro Larroy
lib/hostasyn.c
lib/hostip.h
lib/url.c