Browse code

fixes dead code and close(-1), bb#5782 and bb#5785

Steve Morgan authored on 2012/09/14 01:40:59
Showing 1 changed files
... ...
@@ -414,10 +414,9 @@ int scanstream(int odesc, unsigned long int *scanned, const struct cl_engine *en
414 414
     timeout = optget(opts, "ReadTimeout")->numarg;
415 415
     firsttimeout = optget(opts, "CommandReadTimeout")->numarg;
416 416
 
417
-    if(!bound && !portscan) {
417
+    if(!bound) {
418 418
 	logg("!ScanStream: Can't find any free port.\n");
419 419
 	mdprintf(odesc, "Can't find any free port. ERROR%c", term);
420
-	closesocket(sockfd);
421 420
 	return -1;
422 421
     } else {
423 422
 	listen(sockfd, 1);