namespace: avoid assertion failure (#6649)

If the root image is not decrypted, it must not be relinquished.
This commit is contained in:
Topi Miettinen
2017-08-29 17:31:24 +02:00
committed by Lennart Poettering
parent 7123a951d0
commit 07ce74074d
+5 -3
View File
@@ -1063,9 +1063,11 @@ int setup_namespace(
if (r < 0)
goto finish;
r = decrypted_image_relinquish(decrypted_image);
if (r < 0)
goto finish;
if (decrypted_image) {
r = decrypted_image_relinquish(decrypted_image);
if (r < 0)
goto finish;
}
loop_device_relinquish(loop_device);