]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: fix handler memory leak at lxc_init failed 3028/head
authorLiFeng <lifeng68@huawei.com>
Wed, 5 Jun 2019 04:44:17 +0000 (00:44 -0400)
committerLiFeng <lifeng68@huawei.com>
Wed, 5 Jun 2019 04:44:17 +0000 (00:44 -0400)
Signed-off-by: LiFeng <lifeng68@huawei.com>
src/lxc/start.c

index 51969697e7a1735950d3577195c47c75f0785021..d6477fd1fc13761d73ab82850a457f53c63a2caa 100644 (file)
@@ -2008,7 +2008,7 @@ int __lxc_start(const char *name, struct lxc_handler *handler,
        ret = lxc_init(name, handler);
        if (ret < 0) {
                ERROR("Failed to initialize container \"%s\"", name);
-               return -1;
+               goto out_fini_nonet;
        }
        handler->ops = ops;
        handler->data = data;