cipher: Fix memleaks in (self)tests.
authorPeter Wu <peter@lekensteyn.nl>
Wed, 23 Mar 2016 17:21:53 +0000 (18:21 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 24 Mar 2016 16:02:34 +0000 (17:02 +0100)
commit4a064e2a06fe737f344d1dfd8a45cc4c2abbe4c9
tree3bb1f2e8dd754b87b4eeda2371d39a2b231ce058
parent470a30db241a2d567739ef2adb2a2ee64992d8b4
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.
cipher/dsa.c
cipher/ecc.c
tests/keygen.c