From: Serge Hallyn Date: Mon, 4 Mar 2013 19:29:52 +0000 (-0600) Subject: c api -> createl: correctly handle 0 template args X-Git-Tag: lxc-0.9.0.rc1~2^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63e414f8c128cdf391ae95c547509eb14c59f826;p=thirdparty%2Flxc.git c api -> createl: correctly handle 0 template args Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index bcfc8b61a..3eaf41e61 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -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);