mirror of
git://github.com/lxc/lxc
synced 2025-09-02 09:49:32 +00:00
lxcccontainer: add missing va_end found by coverity
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
@@ -440,8 +440,10 @@ static bool lxcapi_startl(struct lxc_container *c, int useinit, ...)
|
|||||||
break;
|
break;
|
||||||
n_inargs++;
|
n_inargs++;
|
||||||
temp = realloc(inargs, n_inargs * sizeof(*inargs));
|
temp = realloc(inargs, n_inargs * sizeof(*inargs));
|
||||||
if (!temp)
|
if (!temp) {
|
||||||
|
va_end(ap);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
inargs = temp;
|
inargs = temp;
|
||||||
inargs[n_inargs - 1] = strdup(arg); // not sure if it's safe not to copy
|
inargs[n_inargs - 1] = strdup(arg); // not sure if it's safe not to copy
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user