Skip to content
Snippets Groups Projects
Commit 94237657 authored by Pan Nengyuan's avatar Pan Nengyuan Committed by Laurent Vivier
Browse files

blockdev: Fix a memleak in drive_backup_prepare()


'local_err' seems forgot to propagate in error path, it'll cause
a memleak. Fix it.

Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
Signed-off-by: default avatarPan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
Reviewed-by: default avatarLi Qiang <liq3ea@gmail.com>
Signed-off-by: default avatarChen Qun <kuhn.chenqun@huawei.com>
Message-Id: <20201023061218.2080844-7-kuhn.chenqun@huawei.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent cb8d0851
No related branches found
No related tags found
No related merge requests found
......@@ -1827,6 +1827,7 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp)
if (set_backing_hd) {
bdrv_set_backing_hd(target_bs, source, &local_err);
if (local_err) {
error_propagate(errp, local_err);
goto unref;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment