]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: #1425929
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 7 Dec 2017 13:59:55 +0000 (14:59 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 7 Dec 2017 13:59:55 +0000 (14:59 +0100)
free allocated memory

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index c97381b9f46ff587a2d6d4b2b3f7c2e264dfa56a..791b21113f2aa0e6dacbf4f0bf76386608b04951 100644 (file)
@@ -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