OSDN Git Service

qemu-nbd: Destroy the BlockDriverState properly
authorMarkus Armbruster <armbru@redhat.com>
Fri, 12 Sep 2014 19:26:23 +0000 (21:26 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 25 Sep 2014 13:24:14 +0000 (15:24 +0200)
Match the bdrv_new() with a bdrv_unref(), just to be tidy.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-nbd.c

index de9963f..fa60338 100644 (file)
@@ -773,7 +773,7 @@ int main(int argc, char **argv)
         }
     } while (state != TERMINATED);
 
-    bdrv_close(bs);
+    bdrv_unref(bs);
     if (sockpath) {
         unlink(sockpath);
     }