]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lxcccontainer: add missing va_end found by coverity
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Apr 2013 02:12:58 +0000 (21:12 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Apr 2013 02:12:58 +0000 (21:12 -0500)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c

index e09b3fb9146757f1306004839da7c39b9f1772d7..926f089b8fc1e373692ecb72a818ed64c60654a2 100644 (file)
@@ -440,8 +440,10 @@ static bool lxcapi_startl(struct lxc_container *c, int useinit, ...)
                        break;
                n_inargs++;
                temp = realloc(inargs, n_inargs * sizeof(*inargs));
-               if (!temp)
+               if (!temp) {
+                       va_end(ap);
                        goto out;
+               }
                inargs = temp;
                inargs[n_inargs - 1] = strdup(arg);  // not sure if it's safe not to copy
        }