homework: explicitly close cryptsetup context, to not keep loopback device busy
The cryptsetup context pins the loop device even after deactivation. Let's explicitly release the context to make sure the subsequent loopback device detaching works cleanly.
This commit is contained in:
parent
6d7b47eb3e
commit
df14bda2b5
|
@ -2166,6 +2166,9 @@ int home_create_luks(
|
|||
goto fail;
|
||||
}
|
||||
|
||||
crypt_free(cd);
|
||||
cd = NULL;
|
||||
|
||||
dm_activated = false;
|
||||
|
||||
loop = loop_device_unref(loop);
|
||||
|
|
Loading…
Reference in a new issue