From aae991f28dafbf2c8cbbff0b73b7cfc7fed43ab2 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 28 Dec 2017 19:57:57 +0100 Subject: [PATCH] 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. --- common/json.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/json.c b/common/json.c index 899f65fdc..1c037d24c 100644 --- a/common/json.c +++ b/common/json.c @@ -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);