]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commitdiff
qemu-img: Release reference to BlockDriverState
authorPrasad Joshi <prasadjoshi.linux@gmail.com>
Tue, 25 Mar 2014 20:25:53 +0000 (01:55 +0530)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 1 Apr 2014 11:49:53 +0000 (13:49 +0200)
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-img.c

index 77d946b5cccf7410009ea23a9cd4d00191ec01a5..8455994c653c112d5da11a3fde2cb115ac5b4d1e 100644 (file)
@@ -1809,6 +1809,7 @@ static ImageInfoList *collect_image_info_list(const char *filename,
         if (err) {
             error_report("%s", error_get_pretty(err));
             error_free(err);
+            bdrv_unref(bs);
             goto err;
         }