[systemd-devel] [PATCH] fstab-generator: log_oom() if automount_name is null

WANG Chao chaowang at redhat.com
Tue Aug 13 01:38:19 PDT 2013


---
 src/fstab-generator/fstab-generator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 5a2074e..2a779bb 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -351,7 +351,7 @@ static int add_mount(
 
         if (automount && !path_equal(where, "/")) {
                 automount_name = unit_name_from_path(where, ".automount");
-                if (!name)
+                if (!automount_name)
                         return log_oom();
 
                 automount_unit = strjoin(arg_dest, "/", automount_name, NULL);
-- 
1.8.3.1



More information about the systemd-devel mailing list