X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fnamespace.c;h=c2215090a9dfa2bea6d7ecc572d1e22d362b2dac;hb=9f103625b145a397e67c3714766775b615c8b587;hp=eaaebdd64403734c02be7a55974a50827b8a79bf;hpb=a610cc4f18c24a007e5a2cac21b2ecbd81e5f3c3;p=elogind.git diff --git a/src/core/namespace.c b/src/core/namespace.c index eaaebdd64..c2215090a 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -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;