Commit 2c860e79 authored by Fam Zheng's avatar Fam Zheng Committed by Kevin Wolf
Browse files

block: Fix leak of ignore_children in error path



Reported-by: default avatarMax Reitz <mreitz@redhat.com>
Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarAlberto Garcia <berto@igalia.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 4f8e3a1f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3679,12 +3679,12 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
        GSList *ignore_children = g_slist_prepend(NULL, c);
        bdrv_check_update_perm(base, NULL, c->perm, c->shared_perm,
                               ignore_children, &local_err);
        g_slist_free(ignore_children);
        if (local_err) {
            ret = -EPERM;
            error_report_err(local_err);
            goto exit;
        }
        g_slist_free(ignore_children);

        /* If so, update the backing file path in the image file */
        if (c->role->update_filename) {