From 30050769b1490e293d9e0f7ed37d83c3e56bb6b3 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 12 Sep 2021 16:13:27 +0200 Subject: [PATCH] filters: fix memleak on mpath filter destroy Missing free() leaks filter structure. --- WHATS_NEW | 1 + lib/filters/filter-mpath.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index 7d4cea1d6..9ff0be667 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.03.14 - ================================== + Fix memleak in mpath filter. Support newer location for VDO statistics. Add support for VDO async-unsage write policy. Improve lvm_import_vdo script. diff --git a/lib/filters/filter-mpath.c b/lib/filters/filter-mpath.c index 982e23400..7644a5b0a 100644 --- a/lib/filters/filter-mpath.c +++ b/lib/filters/filter-mpath.c @@ -37,6 +37,8 @@ static void _destroy(struct dev_filter *f) { if (f->use_count) log_error(INTERNAL_ERROR "Destroying mpath filter while in use %u times.", f->use_count); + + free(f); } struct dev_filter *mpath_filter_create(struct dev_types *dt)