From: Vsevolod Stakhov Date: Tue, 21 Sep 2021 10:38:17 +0000 (+0100) Subject: [Minor] Fix more error paths in Lua X-Git-Tag: 3.1~136 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=077cee773330eda0b994b7b70fa1d6ec307db478;p=rspamd.git [Minor] Fix more error paths in Lua Found by: coverity scan --- diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index 68c9bb927..2f1a1c5a7 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -969,6 +969,9 @@ lua_http_request (lua_State *L) if (body) { rspamd_fstring_free (body); } + if (local_kp) { + rspamd_keypair_unref (local_kp); + } return 1; } @@ -978,6 +981,9 @@ lua_http_request (lua_State *L) if (body) { rspamd_fstring_free (body); } + if (local_kp) { + rspamd_keypair_unref (local_kp); + } return luaL_error (L, "Bad params to rspamd_http:request(): either task or config should be set"); @@ -989,6 +995,9 @@ lua_http_request (lua_State *L) if (body) { rspamd_fstring_free (body); } + if (local_kp) { + rspamd_keypair_unref (local_kp); + } return luaL_error (L, "Bad params to rspamd_http:request(): ev_base isn't passed");