summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_rsa.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-18 12:29:57 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-18 12:29:57 +0100
commit4041c2d64024f27488461e03fcd587dfbb34c4b0 (patch)
tree9af52fdbc4789fc8f35f164a414431ca37710b43 /src/lua/lua_rsa.c
parent1589bd19ff7c841203c548de2c5897e0f0f22c6d (diff)
downloadrspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.tar.gz
rspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.zip
[Minor] Plug some leaks on error paths
Found by: coverity scan
Diffstat (limited to 'src/lua/lua_rsa.c')
-rw-r--r--src/lua/lua_rsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/lua_rsa.c b/src/lua/lua_rsa.c
index 4b2caa2bf..5e34bc2c6 100644
--- a/src/lua/lua_rsa.c
+++ b/src/lua/lua_rsa.c
@@ -664,6 +664,8 @@ lua_rsa_sign_memory (lua_State *L)
signature->str, (guint *)&signature->len, rsa);
if (ret != 1) {
+ rspamd_fstring_free (signature);
+
return luaL_error (L, "cannot sign: %s",
ERR_error_string (ERR_get_error (), NULL));
}