Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> --- block/nbd-client.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/block/nbd-client.c b/block/nbd-client.c index b7eea21..c49be30 100644 --- a/block/nbd-client.c +++ b/block/nbd-client.c @@ -352,7 +352,12 @@ static void nbd_teardown_connection(NbdClientSession *client) void nbd_client_session_close(NbdClientSession *client) { + if (!client->bs) { + return; + } + nbd_teardown_connection(client); + client->bs = NULL; } int nbd_client_session_init(NbdClientSession *client, BlockDriverState *bs, -- 1.8.3.rc1.49.g8d97506 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel