From: Christian Brauner Date: Thu, 7 Dec 2017 13:59:55 +0000 (+0100) Subject: coverity: #1425929 X-Git-Tag: lxc-2.0.10~502 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbbdb23f093afa8c5344b4e2570ceee954c03bcd;p=thirdparty%2Flxc.git coverity: #1425929 free allocated memory Signed-off-by: Christian Brauner --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 8fb158ab2..dce042851 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -816,10 +816,12 @@ static bool do_lxcapi_start(struct lxc_container *c, int useinit, char * const a /* ... otherwise use default_args. */ if (!argv) { - if (useinit) + if (useinit) { + ERROR("No valid init detected"); + lxc_free_handler(handler); return false; - else - argv = default_args; + } + argv = default_args; } /* I'm not sure what locks we want here.Any? Is liblxc's locking enough