[lxc-devel] [PATCH 4/6] c api -> createl: correctly handle 0 template args
Serge Hallyn
serge.hallyn at ubuntu.com
Mon Mar 4 20:43:26 UTC 2013
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
src/lxc/lxccontainer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index bcfc8b6..3eaf41e 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);
--
1.8.1.2
More information about the lxc-devel
mailing list