[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] blkverify: Fix BDS leak in .bdrv_open error pat
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 2/2] blkverify: Fix BDS leak in .bdrv_open error path |
Date: |
Tue, 13 Oct 2015 14:17:40 +0200 |
Signed-off-by: Kevin Wolf <address@hidden>
---
block/blkverify.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/blkverify.c b/block/blkverify.c
index f8655ad..c5f8e8d 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -143,6 +143,9 @@ static int blkverify_open(BlockDriverState *bs, QDict
*options, int flags,
ret = 0;
fail:
+ if (ret < 0) {
+ bdrv_unref_child(bs, bs->file);
+ }
qemu_opts_del(opts);
return ret;
}
--
1.8.3.1