summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authorDave Reisner2012-03-27 14:53:58 +0200
committerKarel Zak2012-04-10 11:44:47 +0200
commite00fa45272e1acdb613681ac57aecc352223d2ee (patch)
tree24066dd16480c4457b8101588fe0885b478c339a /disk-utils
parentsfdisk: make -l less verbose about missing PT (diff)
downloadkernel-qcow2-util-linux-e00fa45272e1acdb613681ac57aecc352223d2ee.tar.gz
kernel-qcow2-util-linux-e00fa45272e1acdb613681ac57aecc352223d2ee.tar.xz
kernel-qcow2-util-linux-e00fa45272e1acdb613681ac57aecc352223d2ee.zip
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 <dreisner@archlinux.org>
Diffstat (limited to 'disk-utils')
-rw-r--r--disk-utils/fsck.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
index a019a6979..44200d08f 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)