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