From: Topi Miettinen Date: Tue, 29 Aug 2017 15:31:24 +0000 (+0000) Subject: namespace: avoid assertion failure (#6649) X-Git-Tag: v235~220 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=07ce74074da29d8577ccbc98001d57253afd88d2;p=thirdparty%2Fsystemd.git namespace: avoid assertion failure (#6649) If the root image is not decrypted, it must not be relinquished. --- diff --git a/src/core/namespace.c b/src/core/namespace.c index 3eb171c7027..09eac6bfe8d 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -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);