From 9f487d2aaaa3462d9e4ecd76f22a75c9ae847e92 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 11 Feb 2007 23:11:28 +0100 Subject: [PATCH] crypt.c: fix memory leak in para_decrypt_buffer() The client side had more or less the same memory leak as the server side: The rsa structure wasn't freed. --- crypt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypt.c b/crypt.c index 46a90533..0d8b4241 100644 --- a/crypt.c +++ b/crypt.c @@ -101,6 +101,7 @@ int para_decrypt_buffer(char *key_file, unsigned char *outbuf, unsigned char *in if (ret < 0) return ret; ret = RSA_private_decrypt(rsa_inlen, inbuf, outbuf, rsa, RSA_PKCS1_PADDING); + rsa_free(rsa); return (ret > 0)? ret : -E_DECRYPT; } -- 2.39.5