diff --git a/lib/socket-util.c b/lib/socket-util.c index a37dfe4aa..4edf956b5 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -612,6 +612,7 @@ exit: } } else if (fd >= 0) { close(fd); + fd = -1; } *fdp = fd; return error;