From 621c7cc7398bdba8913ac8e93e6a7c57cbd08561 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sat, 10 Apr 2021 12:31:02 +0000 Subject: [PATCH] tests: fix a memory leak in attach Signed-off-by: Evgeny Vereshchagin --- src/tests/attach.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tests/attach.c b/src/tests/attach.c index fbc75fa00..3e43c7b06 100644 --- a/src/tests/attach.c +++ b/src/tests/attach.c @@ -321,8 +321,7 @@ static struct lxc_container *test_ct_create(const char *lxcpath, goto out1; } if (ct->is_defined(ct)) { - ct->stop(ct); - ct->destroy(ct); + test_ct_destroy(ct); ct = lxc_container_new(name, lxcpath); } if (!ct->createl(ct, template, NULL, NULL, 0, NULL)) { -- 2.47.2