From: Andre Noll Date: Sun, 11 Feb 2007 22:11:28 +0000 (+0100) Subject: crypt.c: fix memory leak in para_decrypt_buffer() X-Git-Tag: v0.2.15~12 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=9f487d2aaaa3462d9e4ecd76f22a75c9ae847e92 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. --- 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; }