socket-util: Report fd of -1 on error in inet_open_active().
[openvswitch] / lib / socket-util.c
index a37dfe4aa5cbf01572d87d69b0b3e6be2d6b7771..4edf956b555f69beaaabbfd54eefc0837bc615c4 100644 (file)
@@ -612,6 +612,7 @@ exit:
         }
     } else if (fd >= 0) {
         close(fd);
+        fd = -1;
     }
     *fdp = fd;
     return error;