chiark / gitweb /
fstab-generator: Honor mount.usr*= on kernel command line
[elogind.git] / src / core / namespace.c
index eaaebdd64403734c02be7a55974a50827b8a79bf..c2215090a9dfa2bea6d7ecc572d1e22d362b2dac 100644 (file)
@@ -263,11 +263,8 @@ fail:
         if (devmqueue)
                 umount(devmqueue);
 
-        if (dev) {
-                umount(dev);
-                rmdir(dev);
-        }
-
+        umount(dev);
+        rmdir(dev);
         rmdir(temporary_mount);
 
         return r;
@@ -278,7 +275,7 @@ static int mount_kdbus(BindMount *m) {
         char temporary_mount[] = "/tmp/kdbus-dev-XXXXXX";
         _cleanup_free_ char *basepath = NULL;
         _cleanup_umask_ mode_t u;
-        char *busnode, *root;
+        char *busnode = NULL, *root;
         struct stat st;
         int r;
 
@@ -341,11 +338,8 @@ fail:
                 unlink(busnode);
         }
 
-        if (root) {
-                umount(root);
-                rmdir(root);
-        }
-
+        umount(root);
+        rmdir(root);
         rmdir(temporary_mount);
 
         return r;