From: Christian Brauner Date: Thu, 7 Dec 2017 13:59:55 +0000 (+0100) Subject: coverity: #1425929 X-Git-Tag: lxc-3.0.0.beta1~128^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1e7642342dc296626b3c9f4906c0a60924f8477;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 c97381b9f..791b21113 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -848,10 +848,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