From 6195f9e6fab612694ff97e66f9b276b913aa2d24 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 21 Aug 2013 14:38:38 +0200 Subject: misc: use libmnt_cache reference counting Signed-off-by: Karel Zak --- sys-utils/mount.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys-utils/mount.c') 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) && -- cgit v1.2.3-55-g7522