From 6352df87b16655638f2a9b47622f7683da671f26 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 7 Oct 2014 13:33:43 +0200 Subject: 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! --- lib/asyn-ares.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 01a9c9b50..48b2376ba 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -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); } -- cgit v1.2.3