diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-03-23 18:21:53 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-03-24 17:02:34 +0100 |
commit | 4a064e2a06fe737f344d1dfd8a45cc4c2abbe4c9 (patch) | |
tree | 3bb1f2e8dd754b87b4eeda2371d39a2b231ce058 /cipher/ecc.c | |
parent | 470a30db241a2d567739ef2adb2a2ee64992d8b4 (diff) | |
download | libgcrypt-4a064e2a06fe737f344d1dfd8a45cc4c2abbe4c9.tar.gz |
cipher: Fix memleaks in (self)tests.
* cipher/dsa.c: Release memory for MPI and sexp structures.
* cipher/ecc.c: Release memory for sexp structure.
* tests/keygen.c: Likewise.
--
These leaks broke the mpitests, basic and keygen tests when running
under AddressSanitizer.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Minor formatting changes by -wk.
Diffstat (limited to 'cipher/ecc.c')
-rw-r--r-- | cipher/ecc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cipher/ecc.c b/cipher/ecc.c index 5b035306..8dbf5bd0 100644 --- a/cipher/ecc.c +++ b/cipher/ecc.c @@ -2046,6 +2046,7 @@ selftest_sign (gcry_sexp_t pkey, gcry_sexp_t skey) if (!calculated_r) goto leave; + sexp_release (l2); l2 = _gcry_sexp_find_token (l1, "s", 0); if (!l2) goto leave; |