From: Daniel Stenberg Date: Fri, 29 Apr 2011 14:46:49 +0000 (+0200) Subject: ConnectionExists: avoid NULL dereference X-Git-Tag: curl-7_21_7~140 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=821301de15520d51f4cbdba30372bc062f8a955a;p=curl ConnectionExists: avoid NULL dereference When checking for connections that are bound to a particular device we must make sure we don't compare with a NULL pointer. --- diff --git a/lib/url.c b/lib/url.c index 7c70be818..fa0557711 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2948,6 +2948,7 @@ ConnectionExists(struct SessionHandle *data, if((check->localport != needle->localport) || (check->localportrange != needle->localportrange) || !check->localdev || + !needle->localdev || strcmp(check->localdev, needle->localdev)) continue; }