chiark / gitweb /
fstab-generator: log_oom() if automount_name is null
authorWANG Chao <chaowang@redhat.com>
Tue, 13 Aug 2013 08:38:19 +0000 (16:38 +0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Aug 2013 02:38:09 +0000 (22:38 -0400)
src/fstab-generator/fstab-generator.c

index 5a2074ec7f0496cb0903110d2ee9585463ca5987..2a779bbccf800cc80dc2233b14e1b2b7de0f0dc6 100644 (file)
@@ -351,7 +351,7 @@ static int add_mount(
 
         if (automount && !path_equal(where, "/")) {
                 automount_name = unit_name_from_path(where, ".automount");
 
         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);
                         return log_oom();
 
                 automount_unit = strjoin(arg_dest, "/", automount_name, NULL);