summaryrefslogtreecommitdiffstats
path: root/sys-utils/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r--sys-utils/mount.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 0998b0110..9d9784905 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -163,7 +163,7 @@ static void print_all(struct libmnt_context *cxt, char *pattern, int show_label)
free(xsrc);
}
- mnt_free_cache(cache);
+ mnt_unref_cache(cache);
mnt_free_iter(itr);
}
@@ -990,8 +990,7 @@ int main(int argc, char **argv)
* make a connection between the fstab and the canonicalization
* cache.
*/
- struct libmnt_cache *cache = mnt_context_get_cache(cxt);
- mnt_table_set_cache(fstab, cache);
+ mnt_table_set_cache(fstab, mnt_context_get_cache(cxt));
}
if (!mnt_context_get_source(cxt) &&