From 70f72db0aa9993a3a05aff64902675a4e8f7fdd7 Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 24 Jul 2017 18:20:21 +0200 Subject: [PATCH] fixed memory leak in GxsSecurity --- libretroshare/src/gxs/gxssecurity.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libretroshare/src/gxs/gxssecurity.cc b/libretroshare/src/gxs/gxssecurity.cc index 9c785c1a9..c321969d2 100644 --- a/libretroshare/src/gxs/gxssecurity.cc +++ b/libretroshare/src/gxs/gxssecurity.cc @@ -272,6 +272,8 @@ bool GxsSecurity::generateKeyPair(RsTlvPublicRSAKey& public_key,RsTlvPrivateRSAK RSA_generate_key_ex(rsa, 2048, ebn, NULL); RSA *rsa_pub = RSAPublicKey_dup(rsa); + BN_clear_free(ebn) ; + public_key.keyFlags = RSTLV_KEY_TYPE_PUBLIC_ONLY ; private_key.keyFlags = RSTLV_KEY_TYPE_FULL ;