aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_http.c')
-rw-r--r--src/lua/lua_http.c9
1 files changed, 9 insertions, 0 deletions
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");