From 5936dd03814aa6fd0a7852e98d87342b453b6421 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Thu, 30 Sep 2010 14:12:14 +0000 Subject: [PATCH] Fix memory leak of vg_read while using live copies of metadata in directories. --- WHATS_NEW | 1 + lib/format_text/format-text.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 4dde8a57c..735735e34 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.75 - ===================================== + Fix memory leak of vg_read while using live copies of metadata in directories. Fix memory leak of config_tree in reinitialization code path. Swap pool destruction order in dmeventd_lvm2_exit() to fix leak report. Read whole /proc/self/maps file before working with maps entries. diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index 1a03e84e9..e60df5023 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -1083,9 +1083,11 @@ static int _scan_file(const struct format_type *fmt) fid = _text_create_text_instance(fmt, NULL, NULL, NULL); if ((vg = _vg_read_file_name(fid, vgname, - path))) + path))) { /* FIXME Store creation host in vg */ lvmcache_update_vg(vg, 0); + dm_pool_destroy(vg->vgmem); + } } if (closedir(d)) -- 2.43.5