From f85554c26525ec2ddc860ccb1aadc05e7a3825f6 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 3 Nov 2011 09:54:53 +0100 Subject: mount: free commented /etc/filesystems lines when we read it Signed-off-by: Denys Vlasenko --- util-linux/mount.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util-linux/mount.c b/util-linux/mount.c index 56276ef01..fddd7fba9 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -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); -- cgit v1.2.3