From: Vsevolod Stakhov Date: Mon, 24 Sep 2018 12:11:25 +0000 (+0100) Subject: [Minor] Fix load of the rsa key from base64 X-Git-Tag: 1.8.0~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=44f4d5605ca904768e31a5cfe18a2782ce492e25;p=rspamd.git [Minor] Fix load of the rsa key from base64 --- diff --git a/src/lua/lua_rsa.c b/src/lua/lua_rsa.c index 938fabec2..50702199b 100644 --- a/src/lua/lua_rsa.c +++ b/src/lua/lua_rsa.c @@ -357,7 +357,6 @@ lua_rsa_privkey_load_base64 (lua_State *L) } b = BIO_new_mem_buf (decoded, dec_len); - g_free (decoded); rsa = d2i_RSAPrivateKey_bio (b, NULL); if (rsa == NULL) { @@ -372,6 +371,7 @@ lua_rsa_privkey_load_base64 (lua_State *L) } BIO_free (b); + g_free (decoded); } else { return luaL_error (L, "invalid arguments");