From 44f4d5605ca904768e31a5cfe18a2782ce492e25 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 24 Sep 2018 13:11:25 +0100 Subject: [PATCH] [Minor] Fix load of the rsa key from base64 --- src/lua/lua_rsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.39.5