Don't close the same file descriptor more than once.

This commit is contained in:
Alex Young
2012-08-23 16:01:37 +01:00
parent b1a4db2727
commit c5dfe16f35
3 changed files with 16 additions and 12 deletions

View File

@@ -426,6 +426,7 @@ int mode_serve( int argc, char *argv[] )
if ( err ) { exit_err( serve_help_text ); }
flexnbd = flexnbd_create_serving( ip_addr, ip_port, file, sock, default_deny, argc - optind, argv + optind, MAX_NBD_CLIENTS );
info( "Serving file %s", file );
flexnbd_serve( flexnbd );
flexnbd_destroy( flexnbd );