ecc: fix memory leak.
authorPeter Wu <peter@lekensteyn.nl>
Fri, 10 Jul 2015 01:15:26 +0000 (10:15 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 10 Jul 2015 01:15:26 +0000 (10:15 +0900)
commit2a7aa3ea4d03a9c808d5888f5509c08cd27aa27c
tree4e5074c5af722a944896bb30befdcaa4cd75b641
parent0a7547e487a8bc4e7ac9599c55579eb2e4a13f06
ecc: fix memory leak.

* cipher/ecc.c (ecc_verify): Release memory which was allocated before
by _gcry_pk_util_preparse_sigval.
(ecc_decrypt_raw): Likewise.

--

Caught by LeakSanitizer (LSan). Now the test suite (make check) passes
with no memleaks.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
The last commit (0a7547e487a8bc4e7ac9599c55579eb2e4a13f06) includes
wrong fixes for sexp_release.

ecc_decrypt_raw fix added by gniibe.
cipher/ecc.c