Blob Blame History Raw
From 84fefa4d9e1e6ddc9d2ec486181e2afaeb20f1c9 Mon Sep 17 00:00:00 2001
From: Dave Reisner <d@falconindy.com>
Date: Fri, 17 Feb 2012 12:17:49 -0500
Subject: [PATCH] mount: properly check return for mount_add_*

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

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