summaryrefslogtreecommitdiff
path: root/lib/asyn-ares.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-10-07 13:33:43 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-10-07 13:33:43 +0200
commit6352df87b16655638f2a9b47622f7683da671f26 (patch)
treee8e6bc8709ad6ec1b299feb1eb5eee4686fae68e /lib/asyn-ares.c
parentdddb2aab8d8961fe1483258bd64cbf43b972ce0a (diff)
downloadcurl-6352df87b16655638f2a9b47622f7683da671f26.tar.gz
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!
Diffstat (limited to 'lib/asyn-ares.c')
-rw-r--r--lib/asyn-ares.c2
1 files changed, 1 insertions, 1 deletions
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);
}