Signed-off-by: S.Çağlar Onur <[email protected]>
---
src/lxc/lxc_destroy.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/lxc/lxc_destroy.c b/src/lxc/lxc_destroy.c
index 9983241..1d1e687 100644
--- a/src/lxc/lxc_destroy.c
+++ b/src/lxc/lxc_destroy.c
@@ -108,5 +108,12 @@ int main(int argc, char *argv[])
c->stop(c);
}
- exit(c->destroy(c) ? 0 : 1);
+ if (!c->destroy(c)) {
+ fprintf(stderr, "Destroying %s failed\n", my_args.name);
+ lxc_container_put(c);
+ exit(1);
+ }
+
+ lxc_container_put(c);
+ return 0;
}
--
1.8.1.2
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-devel