launch: Set g->sock = -1 to avoid double-close.

This fixes commit ef5c02c6ee.
This commit is contained in:
Richard W.M. Jones
2012-06-26 13:31:58 +01:00
parent ef5c02c6ee
commit 11317b5d12

View File

@@ -1052,6 +1052,7 @@ launch_appliance (guestfs_h *g)
if (close (g->sock) != 0) {
perrorf (g, "close: listening socket");
close (r);
g->sock = -1;
goto cleanup1;
}
g->sock = r; /* This is the accepted data socket. */