[Libguestfs] [PATCH 4/4] launch: unix: Set g->daemon_sock = -1 after closing it.
Richard W.M. Jones
rjones at redhat.com
Thu Mar 7 11:44:18 UTC 2013
From: "Richard W.M. Jones" <rjones at 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
More information about the Libguestfs
mailing list