]> err.no Git - systemd/commitdiff
mount: properly check return for mount_add_*
authorDave Reisner <d@falconindy.com>
Fri, 17 Feb 2012 17:17:49 +0000 (12:17 -0500)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Mar 2012 01:16:41 +0000 (02:16 +0100)
Previously, mount_load_etc_fstab() could never fail for reasons other
than a setmntent() or allocation failure.

src/mount.c

index f80fcf5f4ab29c16052e0df8940fa41206e05210..982715a6dba86ddd2f34c6666ab53318de3f1c93 100644 (file)
@@ -1578,7 +1578,7 @@ static int mount_load_etc_fstab(Manager *m) {
                 free(what);
                 free(where);
 
-                if (r < 0)
+                if (k < 0)
                         r = k;
         }