aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-04-29 16:46:49 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-04-29 16:46:49 +0200
commit821301de15520d51f4cbdba30372bc062f8a955a (patch)
tree544f84b658ace5b1bce47201ee90e2ff2ea6a8ab
parent3440f4d3742d913863cedd0865916c0dd47063a6 (diff)
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.
-rw-r--r--lib/url.c1
1 files changed, 1 insertions, 0 deletions
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;
}