Commit 1f01c76f authored by Ondrej Kozina's avatar Ondrej Kozina

fix memory leak on failed luks2 activation

parent 16da1a5c
......@@ -1788,6 +1788,7 @@ int LUKS2_activate(struct crypt_device *cd,
&dmd.size);
if (r < 0) {
log_err(cd, "Cannot detect integrity device size.\n");
device_free(device);
dm_remove_device(cd, dm_int_name, 0);
return r;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment