Fix leaks detected by Coverity.

This commit is contained in:
Milan Broz
2025-01-16 21:27:43 +01:00
parent 7ffa8ee28a
commit 6a8f88ea99
2 changed files with 6 additions and 2 deletions

View File

@@ -2913,6 +2913,8 @@ static int reencrypt_decrypt_with_datashift_init(struct crypt_device *cd,
jobj_segments_old = reencrypt_segments_old(hdr);
if (!jobj_segments_old) {
dm_targets_free(cd, &dmd_target);
free(CONST_CAST(void*)dmd_target.uuid);
r = -EINVAL;
goto out;
}