mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 09:08:49 -05:00
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
This commit is contained in:
parent
73f52ad763
commit
c4b8ec495d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user