conf: va_end was not called.

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
This commit is contained in:
Donghwa Jeong 2018-05-29 22:01:27 +09:00
parent 87c6e5db2a
commit 7b5a2435a2

View File

@ -530,8 +530,10 @@ int run_script(const char *name, const char *section, const char *script, ...)
int len = size - ret;
int rc;
rc = snprintf(buffer + ret, len, " %s", p);
if (rc < 0 || rc >= len)
if (rc < 0 || rc >= len) {
va_end(ap);
return -1;
}
ret += rc;
}
va_end(ap);