]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
c api -> createl: correctly handle 0 template args
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 4 Mar 2013 19:29:52 +0000 (13:29 -0600)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 4 Mar 2013 20:27:18 +0000 (14:27 -0600)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c

index bcfc8b61a2f89b23d109fec5c70e36b98408b235..3eaf41e619ce3c1aae1d2af09457228f33447eaa 100644 (file)
@@ -692,7 +692,8 @@ static bool lxcapi_createl(struct lxc_container *c, char *t, ...)
                args[nargs - 1] = arg;
        }
        va_end(ap);
-       args[nargs] = NULL;
+       if (args)
+               args[nargs] = NULL;
 
        bret = c->create(c, t, args);