ares::Curl_resolver_cancel: skip checking for NULL conn

Coverity CID 1243581. 'conn' will never be NULL here, and if it would be
the subsequent statement would dereference it!
This commit is contained in:
Daniel Stenberg 2014-10-07 13:33:43 +02:00
parent dddb2aab8d
commit 6352df87b1

View File

@ -178,7 +178,7 @@ static void destroy_async_data (struct Curl_async *async);
*/
void Curl_resolver_cancel(struct connectdata *conn)
{
if(conn && conn->data && conn->data->state.resolver)
if(conn->data && conn->data->state.resolver)
ares_cancel((ares_channel)conn->data->state.resolver);
destroy_async_data(&conn->async);
}