summaryrefslogtreecommitdiff
path: root/sys-utils/mountpoint.c
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-06-12 12:04:01 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2014-06-12 12:04:01 +0100
commitc5c1033c5c7deda8abe3448ec81bbb33c72219e0 (patch)
tree6e5cef29b85161eea8a7488a029f5a32f982c6ab /sys-utils/mountpoint.c
parent462008f79be9e195670b202cb43827b8aeb1e60b (diff)
parent2fb567c080e1762ec6a2147564f03068f55d4f14 (diff)
downloadutil-linux-baserock/morph.tar.gz
Merge branch 'baserock/richardmaw/yakshave/util-linux-blkid' into baserock/morphbaserock/morph
Reviewed-by: Lars Wirzenius Reviewed-by: Sam Thursfield
Diffstat (limited to 'sys-utils/mountpoint.c')
-rw-r--r--sys-utils/mountpoint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/mountpoint.c b/sys-utils/mountpoint.c
index c86e94b12..cba5f0125 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)) {
@@ -90,8 +91,7 @@ static int dir_to_device(const char *spec, dev_t *dev)
rc = 0;
}
- mnt_free_table(tb);
- mnt_free_cache(cache);
+ mnt_unref_table(tb);
return rc;
}