diff options
-rw-r--r-- | src/launch.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/launch.c b/src/launch.c index 3b1f91c3..acaeebf5 100644 --- a/src/launch.c +++ b/src/launch.c @@ -1015,7 +1015,12 @@ launch_appliance (guestfs_h *g) * able to open a drive. */ - close (g->sock); /* Close the listening socket. */ + /* Close the listening socket. */ + if (close (g->sock) != 0) { + perrorf (g, "close: listening socket"); + close (r); + goto cleanup1; + } g->sock = r; /* This is the accepted data socket. */ if (fcntl (g->sock, F_SETFL, O_NONBLOCK) == -1) { |