From: "Richard W.M. Jones" <rjones(a)redhat.com>
This ensures we don't accidentally use the closed fd.
---
src/launch-unix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/launch-unix.c b/src/launch-unix.c
index 69de2f7..db49a3c 100644
--- a/src/launch-unix.c
+++ b/src/launch-unix.c
@@ -98,6 +98,7 @@ launch_unix (guestfs_h *g, const char *sockpath)
cleanup:
close (g->daemon_sock);
+ g->daemon_sock = -1;
return -1;
}
--
1.8.1.4