[dm- devel][PATCH] tests/hwtable: fix a memory free in replicate_config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In replicate_config func, hwtable is allocated by calling get_used_hwes
func, however it is not freed.

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@xxxxxxxxxx>
---
 tests/hwtable.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/hwtable.c b/tests/hwtable.c
index 473028b7..84d2b35f 100644
--- a/tests/hwtable.c
+++ b/tests/hwtable.c
@@ -468,6 +468,7 @@ static void replicate_config(const struct hwt_state *hwt, bool local)
 		/* "local" configuration */
 		hwtable = get_used_hwes(hwt->vecs->pathvec);
 		cfg1 = snprint_config(conf, NULL, hwtable, hwt->vecs->mpvec);
+		vector_free(hwtable);
 	}

 	assert_non_null(cfg1);
-- 
2.24.0.windows.2


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux