diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-06-12 18:37:52 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-06-13 23:42:57 +0200 |
commit | c4b8ec495d534e15e919c0e47b7e2d3086443ccf (patch) | |
tree | 044b8ebb04fa87787869aea9cedbf74d48afaff1 | |
parent | 73f52ad7631ca4bd5449e5c4eb17cefcb28edc37 (diff) | |
download | curl-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.c | 3 |
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); } |