crypto: luks: Fix tiny memory leak

When the underlying block device doesn't support the
bdrv_co_delete_file interface, an 'Error' object was leaked.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201217170904.946013-2-mlevitsk@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Maxim Levitsky 2020-12-17 19:09:02 +02:00 committed by Kevin Wolf
parent f8b467b443
commit dcb6699512
1 changed files with 2 additions and 0 deletions

View File

@ -735,6 +735,8 @@ fail:
*/
if ((r_del < 0) && (r_del != -ENOTSUP)) {
error_report_err(local_delete_err);
} else {
error_free(local_delete_err);
}
}