projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89b2ebc
)
crypt.c: fix memory leak in para_decrypt_buffer()
author
Andre Noll
<maan@systemlinux.org>
Sun, 11 Feb 2007 22:11:28 +0000
(23:11 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Sun, 11 Feb 2007 22:11:28 +0000
(23:11 +0100)
The client side had more or less the same memory leak as the server side:
The rsa structure wasn't freed.
crypt.c
patch
|
blob
|
history
diff --git
a/crypt.c
b/crypt.c
index 46a90533489696df9c3fb2eff665535b3bf2e0bf..0d8b42410ea133355d396a2c689ddaf84b12c160 100644
(file)
--- 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;
}