mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 04:40:05 +01:00
Fix an error path memory leak.
This commit is contained in:
@@ -2393,8 +2393,10 @@ static int action_luksErase(void)
|
|||||||
|
|
||||||
/* Safety check */
|
/* Safety check */
|
||||||
max = crypt_keyslot_max(crypt_get_type(cd));
|
max = crypt_keyslot_max(crypt_get_type(cd));
|
||||||
if (max <= 0)
|
if (max <= 0) {
|
||||||
return -EINVAL;
|
r = -EINVAL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < max; i++) {
|
for (i = 0; i < max; i++) {
|
||||||
ki = crypt_keyslot_status(cd, i);
|
ki = crypt_keyslot_status(cd, i);
|
||||||
|
|||||||
Reference in New Issue
Block a user