mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-22 08:10:04 +01:00
Fix possible leak if reencryption is interrupted.
This commit is contained in:
@@ -1006,8 +1006,12 @@ static int init_passphrase1(struct reenc_ctx *rc, struct crypt_device *cd,
|
|||||||
NULL /*opt_key_file*/, 0, 0, 0 /*pwquality*/, cd);
|
NULL /*opt_key_file*/, 0, 0, 0 /*pwquality*/, cd);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
if (quit)
|
if (quit) {
|
||||||
|
crypt_safe_free(password);
|
||||||
|
password = NULL;
|
||||||
|
passwordLen = 0;
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
}
|
||||||
|
|
||||||
if (check)
|
if (check)
|
||||||
r = crypt_activate_by_passphrase(cd, NULL, slot_to_check,
|
r = crypt_activate_by_passphrase(cd, NULL, slot_to_check,
|
||||||
|
|||||||
Reference in New Issue
Block a user