提交 5b84106b 编写于 作者: M Max Reitz 提交者: Kevin Wolf

qcow2: Fix leaks in dirty images

When opening dirty images, qcow2's repair function should not only
repair errors but leaks as well.
Signed-off-by: NMax Reitz <mreitz@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NBenoît Canet <benoit.canet@nodalink.com>
Reviewed-by: NKevin Wolf <kwolf@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 1d13d654
...@@ -910,7 +910,7 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags, ...@@ -910,7 +910,7 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
(s->incompatible_features & QCOW2_INCOMPAT_DIRTY)) { (s->incompatible_features & QCOW2_INCOMPAT_DIRTY)) {
BdrvCheckResult result = {0}; BdrvCheckResult result = {0};
ret = qcow2_check(bs, &result, BDRV_FIX_ERRORS); ret = qcow2_check(bs, &result, BDRV_FIX_ERRORS | BDRV_FIX_LEAKS);
if (ret < 0) { if (ret < 0) {
error_setg_errno(errp, -ret, "Could not repair dirty image"); error_setg_errno(errp, -ret, "Could not repair dirty image");
goto fail; goto fail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册