Skip to content

Commit

Permalink
ares::Curl_resolver_cancel: skip checking for NULL conn
Browse files Browse the repository at this point in the history
Coverity CID 1243581. 'conn' will never be NULL here, and if it would be
the subsequent statement would dereference it!
  • Loading branch information
bagder committed Oct 7, 2014
1 parent dddb2aa commit 6352df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/asyn-ares.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6352df8

Please sign in to comment.