Unverified Commit b4ad57ae by Evgeny Vereshchagin Committed by Christian Brauner

tests: fix a memory leak in attach

parent 257562c2
...@@ -321,8 +321,7 @@ static struct lxc_container *test_ct_create(const char *lxcpath, ...@@ -321,8 +321,7 @@ static struct lxc_container *test_ct_create(const char *lxcpath,
goto out1; goto out1;
} }
if (ct->is_defined(ct)) { if (ct->is_defined(ct)) {
ct->stop(ct); test_ct_destroy(ct);
ct->destroy(ct);
ct = lxc_container_new(name, lxcpath); ct = lxc_container_new(name, lxcpath);
} }
if (!ct->createl(ct, template, NULL, NULL, 0, NULL)) { if (!ct->createl(ct, template, NULL, NULL, 0, NULL)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment