[systemd-devel] [PATCH] mount: properly check return for mount_add_*

Dave Reisner d at falconindy.com
Fri Feb 17 09:17:49 PST 2012


Previously, mount_load_etc_fstab() could never fail for reasons other
than a setmntent() or allocation failure.
---
 src/mount.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mount.c b/src/mount.c
index 0ae964b..5e52a54 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -1578,7 +1578,7 @@ static int mount_load_etc_fstab(Manager *m) {
                 free(what);
                 free(where);
 
-                if (r < 0)
+                if (k < 0)
                         r = k;
         }
 
-- 
1.7.9.1



More information about the systemd-devel mailing list