summaryrefslogtreecommitdiffstats
path: root/disk-utils/fsck.c
diff options
context:
space:
mode:
Diffstat (limited to 'disk-utils/fsck.c')
-rw-r--r--disk-utils/fsck.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
index 535184e81..277d04105 100644
--- a/disk-utils/fsck.c
+++ b/disk-utils/fsck.c
@@ -450,10 +450,14 @@ static void fs_interpret_type(struct libmnt_fs *fs)
device = fs_get_device(fs);
if (device) {
int ambi = 0;
+ char *tp;
+ struct libmnt_cache *cache = mnt_table_get_cache(fstab);
- type = mnt_get_fstype(device, &ambi, mnt_table_get_cache(fstab));
+ tp = mnt_get_fstype(device, &ambi, cache);
if (!ambi)
- mnt_fs_set_fstype(fs, type);
+ mnt_fs_set_fstype(fs, tp);
+ if (!cache)
+ free(tp);
}
}