From e5d7bbeb10b72888e112646ef68b1bea0e4e286d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 12 Sep 2014 21:26:23 +0200 Subject: [PATCH] qemu-nbd: Destroy the BlockDriverState properly Match the bdrv_new() with a bdrv_unref(), just to be tidy. Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- qemu-nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index de9963f8fb..fa603382d4 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -773,7 +773,7 @@ int main(int argc, char **argv) } } while (state != TERMINATED); - bdrv_close(bs); + bdrv_unref(bs); if (sockpath) { unlink(sockpath); }