bmf: do not close an 'error' socket return value
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 22 Oct 2012 13:27:00 +0000 (15:27 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 22 Oct 2012 13:33:15 +0000 (15:33 +0200)
Coverity:
CID 739657 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
At (12): "listeningSkfd" is passed to a parameter that cannot be negative.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/bmf/src/NetworkInterfaces.c

index ac46bbd..295b49b 100644 (file)
@@ -1419,7 +1419,6 @@ static int CreateInterface(
     listeningSkfd = CreateListeningSocket(ifName);
     if (listeningSkfd < 0)
     {
-      close(listeningSkfd);
       close(encapsulatingSkfd); /* no problem if 'encapsulatingSkfd' is -1 */
       free(newIf);
       return 0;