Add missing call to va_end()

Each invocation of va_start() must be matched by a corresponding
invocation of va_end() in the same function.
This commit is contained in:
practicalswift 2017-12-28 19:57:57 +01:00 committed by Rusty Russell
parent c6b5e72e3b
commit aae991f28d

View File

@ -264,8 +264,10 @@ bool json_get_params(const char *buffer, const jsmntok_t param[], ...)
&& buffer[(*tokptr)->start] == 'n') {
*tokptr = NULL;
}
if (compulsory && !*tokptr)
if (compulsory && !*tokptr) {
va_end(ap);
return false;
}
}
va_end(ap);