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.
This commit is contained in:
Daniel Stenberg 2011-04-29 16:46:49 +02:00
parent 3440f4d374
commit 821301de15
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}