diff mbox

[3/4] qemu-nbd: Destroy the BlockDriverState properly

Message ID 1410549984-16110-4-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster Sept. 12, 2014, 7:26 p.m. UTC
Match the bdrv_new() with a bdrv_unref(), just to be tidy.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qemu-nbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini Sept. 13, 2014, 12:49 p.m. UTC | #1
Il 12/09/2014 21:26, Markus Armbruster ha scritto:
> Match the bdrv_new() with a bdrv_unref(), just to be tidy.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  qemu-nbd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qemu-nbd.c b/qemu-nbd.c
> index 9bc152e..f3cf8a2 100644
> --- a/qemu-nbd.c
> +++ b/qemu-nbd.c
> @@ -769,7 +769,7 @@ int main(int argc, char **argv)
>          }
>      } while (state != TERMINATED);
>  
> -    bdrv_close(bs);
> +    bdrv_unref(bs);
>      if (sockpath) {
>          unlink(sockpath);
>      }
> 

Applying to nbd-next, thanks.

Paolo
diff mbox

Patch

diff --git a/qemu-nbd.c b/qemu-nbd.c
index 9bc152e..f3cf8a2 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -769,7 +769,7 @@  int main(int argc, char **argv)
         }
     } while (state != TERMINATED);
 
-    bdrv_close(bs);
+    bdrv_unref(bs);
     if (sockpath) {
         unlink(sockpath);
     }