mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-22 00:00:07 +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);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (quit)
|
||||
if (quit) {
|
||||
crypt_safe_free(password);
|
||||
password = NULL;
|
||||
passwordLen = 0;
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
if (check)
|
||||
r = crypt_activate_by_passphrase(cd, NULL, slot_to_check,
|
||||
|
||||
Reference in New Issue
Block a user