From af86564357ca39b69bf91b615e412004e1fb5da0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 12 Feb 2016 13:09:28 +0100 Subject: [PATCH] libmount: fix memleak in mnt_pretty_path() References: https://github.com/karelzak/util-linux/issues/275 Signed-off-by: Karel Zak --- libmount/src/cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmount/src/cache.c b/libmount/src/cache.c index eb6146d1a2..b9b607bb00 100644 --- a/libmount/src/cache.c +++ b/libmount/src/cache.c @@ -635,6 +635,7 @@ char *mnt_pretty_path(const char *path, struct libmnt_cache *cache) if (loopcxt_is_autoclear(&lc)) { char *tmp = loopcxt_get_backing_file(&lc); if (tmp) { + loopcxt_deinit(&lc); if (!cache) free(pretty); /* not cached, deallocate */ return tmp; /* return backing file */ -- 2.47.2