From: Dave Reisner Date: Tue, 27 Mar 2012 12:53:58 +0000 (-0400) Subject: fsck: don't free fstab table on parse failure X-Git-Tag: v2.22-rc1~553 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e00fa45272e1acdb613681ac57aecc352223d2ee;p=thirdparty%2Futil-linux.git 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 --- 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)