summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-06-12 18:37:52 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-06-13 23:42:57 +0200
commitc4b8ec495d534e15e919c0e47b7e2d3086443ccf (patch)
tree044b8ebb04fa87787869aea9cedbf74d48afaff1
parent73f52ad7631ca4bd5449e5c4eb17cefcb28edc37 (diff)
downloadcurl-c4b8ec495d534e15e919c0e47b7e2d3086443ccf.tar.gz
asyn-ares: remove check for 'data' in Curl_resolver_cancel
It implied it would survive a NULL in there which it won't. Instead do an assert. Pointed out by scan-build. Closes #7248
-rw-r--r--lib/asyn-ares.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index 9ee307beb..839fabb86 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -206,7 +206,8 @@ static void destroy_async_data(struct Curl_async *async);
*/
void Curl_resolver_cancel(struct Curl_easy *data)
{
- if(data && data->state.async.resolver)
+ DEBUGASSERT(data);
+ if(data->state.async.resolver)
ares_cancel((ares_channel)data->state.async.resolver);
destroy_async_data(&data->state.async);
}