summaryrefslogtreecommitdiffstats
path: root/sys-utils/mountpoint.c
diff options
context:
space:
mode:
authorKarel Zak2013-08-21 14:38:38 +0200
committerKarel Zak2013-08-21 14:38:38 +0200
commit6195f9e6fab612694ff97e66f9b276b913aa2d24 (patch)
treee20e772ab6cf20504268c1e776f3cfe6913fd21f /sys-utils/mountpoint.c
parentlibmount: add reference counting to libmnt_cache (diff)
downloadkernel-qcow2-util-linux-6195f9e6fab612694ff97e66f9b276b913aa2d24.tar.gz
kernel-qcow2-util-linux-6195f9e6fab612694ff97e66f9b276b913aa2d24.tar.xz
kernel-qcow2-util-linux-6195f9e6fab612694ff97e66f9b276b913aa2d24.zip
misc: use libmnt_cache reference counting
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/mountpoint.c')
-rw-r--r--sys-utils/mountpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/mountpoint.c b/sys-utils/mountpoint.c
index c86e94b12..4f6dbbd3f 100644
--- a/sys-utils/mountpoint.c
+++ b/sys-utils/mountpoint.c
@@ -83,6 +83,7 @@ static int dir_to_device(const char *spec, dev_t *dev)
/* to canonicalize all necessary paths */
cache = mnt_new_cache();
mnt_table_set_cache(tb, cache);
+ mnt_unref_cache(cache);
fs = mnt_table_find_target(tb, spec, MNT_ITER_BACKWARD);
if (fs && mnt_fs_get_target(fs)) {
@@ -91,7 +92,6 @@ static int dir_to_device(const char *spec, dev_t *dev)
}
mnt_free_table(tb);
- mnt_free_cache(cache);
return rc;
}