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,9 +264,11 @@ bool json_get_params(const char *buffer, const jsmntok_t param[], ...)
&& buffer[(*tokptr)->start] == 'n') { && buffer[(*tokptr)->start] == 'n') {
*tokptr = NULL; *tokptr = NULL;
} }
if (compulsory && !*tokptr) if (compulsory && !*tokptr) {
va_end(ap);
return false; return false;
} }
}
va_end(ap); va_end(ap);
return true; return true;