diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-07-07 18:43:30 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-07-07 19:32:05 +0200 |
commit | 693abf252741abea667f96cb67f3a11ef35a054e (patch) | |
tree | 04ae46d494012337eb5c38641307de6829fd9b54 | |
parent | 0fdf8c3d4a4348452f28c037e422c489605c91d7 (diff) | |
download | libgcrypt-693abf252741abea667f96cb67f3a11ef35a054e.tar.gz |
ecc: fix memory leak
* cipher/ecc.c: Release memory which was allocated before by
_gcry_pk_util_preparse_sigval.
--
Caught by LeakSanitizer (LSan). Now the test suite (make check) passes
with no memleaks.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
-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 f5bc50aa..c17a553f 100644 --- a/cipher/ecc.c +++ b/cipher/ecc.c @@ -1040,6 +1040,7 @@ ecc_verify (gcry_sexp_t s_sig, gcry_sexp_t s_data, gcry_sexp_t s_keyparms) if (rc) goto leave; } + sexp_release (l1); /* Add missing parameters using the optional curve parameter. */ l1 = sexp_find_token (s_keyparms, "curve", 5); if (l1) |