From: Evgeny Vereshchagin Date: Sat, 10 Apr 2021 12:31:02 +0000 (+0000) Subject: tests: fix a memory leak in attach X-Git-Tag: lxc-5.0.0~207^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3784%2Fhead;p=thirdparty%2Flxc.git tests: fix a memory leak in attach Signed-off-by: Evgeny Vereshchagin --- 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)) {