]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix error path varargs handling
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Sep 2021 20:33:01 +0000 (21:33 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Sep 2021 20:33:01 +0000 (21:33 +0100)
Found by: coverity

src/lua/lua_common.c

index ee29f9b9d1fabf160f6927722218463f6a37e3a7..cd557f816ef44854f7d8eafeaea85f0c5fbf4f54 100644 (file)
@@ -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;
        }