aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/socket-util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/socket-util.c b/lib/socket-util.c
index 82a33c20..39fd225a 100644
--- a/lib/socket-util.c
+++ b/lib/socket-util.c
@@ -613,6 +613,7 @@ exit:
}
} else if (fd >= 0) {
close(fd);
+ fd = -1;
}
*fdp = fd;
return error;