diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-11-03 09:54:53 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-11-03 09:54:53 +0100 |
commit | f85554c26525ec2ddc860ccb1aadc05e7a3825f6 (patch) | |
tree | c4b5daf2c2c084b05d6bc49305c56a45a2dea4c0 | |
parent | 3b1603410a29046e5dcabe1bdfc2dc109461111d (diff) | |
download | busybox-w32-f85554c26525ec2ddc860ccb1aadc05e7a3825f6.tar.gz busybox-w32-f85554c26525ec2ddc860ccb1aadc05e7a3825f6.tar.bz2 busybox-w32-f85554c26525ec2ddc860ccb1aadc05e7a3825f6.zip |
mount: free commented /etc/filesystems lines when we read it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/mount.c | 5 |
1 files 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) | |||
522 | 522 | ||
523 | while ((buf = xmalloc_fgetline(f)) != NULL) { | 523 | while ((buf = xmalloc_fgetline(f)) != NULL) { |
524 | if (strncmp(buf, "nodev", 5) == 0 && isspace(buf[5])) | 524 | if (strncmp(buf, "nodev", 5) == 0 && isspace(buf[5])) |
525 | continue; | 525 | goto next; |
526 | fs = skip_whitespace(buf); | 526 | fs = skip_whitespace(buf); |
527 | if (*fs == '#' || *fs == '*' || !*fs) | 527 | if (*fs == '#' || *fs == '*' || !*fs) |
528 | continue; | 528 | goto next; |
529 | 529 | ||
530 | llist_add_to_end(&list, xstrdup(fs)); | 530 | llist_add_to_end(&list, xstrdup(fs)); |
531 | next: | ||
531 | free(buf); | 532 | free(buf); |
532 | } | 533 | } |
533 | if (ENABLE_FEATURE_CLEAN_UP) fclose(f); | 534 | if (ENABLE_FEATURE_CLEAN_UP) fclose(f); |