From e00fa45272e1acdb613681ac57aecc352223d2ee Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 27 Mar 2012 08:53:58 -0400 Subject: [PATCH] fsck: don't free fstab table on parse failure Even if we fail parsing, fstab gets referenced later in the code (and will subsequently crash via heap corruption). Take the easy way out and simply avoid deallocating this table, as it will be freed for us on program exit regardless. Signed-off-by: Dave Reisner --- disk-utils/fsck.c | 1 - 1 file changed, 1 deletion(-) diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c index a019a6979b..44200d08fa 100644 --- a/disk-utils/fsck.c +++ b/disk-utils/fsck.c @@ -430,7 +430,6 @@ static void load_fs_info(void) path = getenv("FSTAB_FILE"); if (mnt_table_parse_fstab(fstab, path)) { - mnt_free_table(fstab); if (!path) path = mnt_get_fstab_path(); if (errno) -- 2.47.3