mount: free commented /etc/filesystems lines when we read it

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2011-11-03 09:54:53 +01:00
parent 3b1603410a
commit f85554c265

View 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);