aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-17 21:33:01 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-17 21:33:01 +0100
commitb7146906059d461da0e739978c559cefc3afe371 (patch)
treec9ab2bdd126d53cbef7ec0881f138c7e9c4b130f /src
parent51eefb68d58a68fcffc61e9d3893769f21a50236 (diff)
downloadrspamd-b7146906059d461da0e739978c559cefc3afe371.tar.gz
rspamd-b7146906059d461da0e739978c559cefc3afe371.zip
[Minor] Fix error path varargs handling
Found by: coverity
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
index ee29f9b9d..cd557f816 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
@@ -2623,6 +2623,7 @@ rspamd_lua_universal_pcall (lua_State *L, gint cbref, const gchar* strloc,
g_set_error (err, lua_error_quark (), EINVAL,
"invalid argument character: %c at %s",
*argp, argp);
+ va_end (ap);
return false;
}
@@ -2635,6 +2636,7 @@ rspamd_lua_universal_pcall (lua_State *L, gint cbref, const gchar* strloc,
"error when calling lua function from %s: %s",
strloc, lua_tostring (L, -1));
lua_settop (L, err_idx - 1);
+ va_end (ap);
return false;
}