diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-10-07 13:33:43 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-10-07 13:33:43 +0200 |
commit | 6352df87b16655638f2a9b47622f7683da671f26 (patch) | |
tree | e8e6bc8709ad6ec1b299feb1eb5eee4686fae68e | |
parent | dddb2aab8d8961fe1483258bd64cbf43b972ce0a (diff) |
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!
-rw-r--r-- | lib/asyn-ares.c | 2 |
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); } |