mount: free commented /etc/filesystems lines when we read it
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 3 Nov 2011 08:54:53 +0000 (09:54 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 3 Nov 2011 08:54:53 +0000 (09:54 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/mount.c

index 56276ef01c5244ae3497abfa402fdff5b172c78d..fddd7fba97fc8b13d9ab8abb182bc4835256548a 100644 (file)
@@ -522,12 +522,13 @@ static llist_t *get_block_backed_filesystems(void)
 
                while ((buf = xmalloc_fgetline(f)) != NULL) {
                        if (strncmp(buf, "nodev", 5) == 0 && isspace(buf[5]))
-                               continue;
+                               goto next;
                        fs = skip_whitespace(buf);
                        if (*fs == '#' || *fs == '*' || !*fs)
-                               continue;
+                               goto next;
 
                        llist_add_to_end(&list, xstrdup(fs));
+ next:
                        free(buf);
                }
                if (ENABLE_FEATURE_CLEAN_UP) fclose(f);