]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: fix a memory leak in attach 3784/head
authorEvgeny Vereshchagin <evvers@ya.ru>
Sat, 10 Apr 2021 12:31:02 +0000 (12:31 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Sat, 10 Apr 2021 12:31:02 +0000 (12:31 +0000)
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
src/tests/attach.c

index fbc75fa00783db1382a7015fbe88dc06c6124eba..3e43c7b06e6a8d0c81005e0fc3e0186e647350ad 100644 (file)
@@ -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)) {