]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lxccontaienr: fix missing va_end in error case.
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Apr 2013 02:17:09 +0000 (21:17 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Apr 2013 02:17:09 +0000 (21:17 -0500)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c

index 926f089b8fc1e373692ecb72a818ed64c60654a2..27e86f97282e5d2586e0c1c7cf203e3ff52bc0ca 100644 (file)
@@ -719,8 +719,10 @@ static bool lxcapi_createl(struct lxc_container *c, char *t, ...)
                        break;
                nargs++;
                temp = realloc(args, (nargs+1) * sizeof(*args));
-               if (!temp)
+               if (!temp) {
+                       va_end(ap);
                        goto out;
+               }
                args = temp;
                args[nargs - 1] = arg;
        }