]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxccontainer: lxcapi_startl()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 24 Feb 2018 14:26:35 +0000 (15:26 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 23 Aug 2018 20:28:51 +0000 (22:28 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 8bd02fdaa4b8f645f70d3e1a6eeda71c88c355ae..fed66c8e312f28c4115224a345d3e8b17ff15d2d 100644 (file)
@@ -1077,9 +1077,7 @@ static bool lxcapi_start(struct lxc_container *c, int useinit,
        return ret;
 }
 
-/*
- * note there MUST be an ending NULL
- */
+/* Note, there MUST be an ending NULL. */
 static bool lxcapi_startl(struct lxc_container *c, int useinit, ...)
 {
        va_list ap;
@@ -1095,16 +1093,13 @@ static bool lxcapi_startl(struct lxc_container *c, int useinit, ...)
        va_start(ap, useinit);
        inargs = lxc_va_arg_list_to_argv(ap, 0, 1);
        va_end(ap);
-
-       if (!inargs) {
-               ERROR("Memory allocation error.");
-               goto out;
-       }
+       if (!inargs)
+               goto on_error;
 
        /* pass NULL if no arguments were supplied */
        bret = do_lxcapi_start(c, useinit, *inargs ? inargs : NULL);
 
-out:
+on_error:
        if (inargs) {
                char **arg;
                for (arg = inargs; *arg; arg++)
@@ -1113,6 +1108,7 @@ out:
        }
 
        current_config = NULL;
+
        return bret;
 }