memory leak in rsa.c
Rupert Kittinger
rkit at mur.at
Thu Dec 16 22:23:49 CET 2004
Hello everybody,
I think I found a memory leak in 1.2.0 in file rsa.c. (with the generous
support of valgrind...)
Patch is attached.
Rupert
--
Rupert Kittinger <rkit at mur.at>
-------------- next part --------------
diff -upr libgcrypt-1.2.0/cipher/rsa.c libgcrypt-1.2.0-patched/cipher/rsa.c
--- libgcrypt-1.2.0/cipher/rsa.c 2003-12-11 16:02:43.000000000 +0100
+++ libgcrypt-1.2.0-patched/cipher/rsa.c 2004-12-16 18:13:58.763112002 +0100
@@ -547,6 +547,7 @@ _gcry_rsa_decrypt (int algo, gcry_mpi_t
gcry_mpi_release (y);
y = rsa_unblind (a, ri, sk.n);
+ gcry_mpi_release (a);
}
if (! (flags & PUBKEY_FLAG_NO_BLINDING))
More information about the Gcrypt-devel
mailing list