1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-31 22:18:03 +02:00

g10: Fix memory leak.

* g10/import.c (transfer_secret_keys): Release curve from the previous
iteration.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-07-01 13:43:01 +02:00
parent ff77b92aae
commit c454922ffa

View File

@ -1524,6 +1524,7 @@ transfer_secret_keys (ctrl_t ctrl, struct import_stats_s *stats,
else else
{ {
const char *curvename = openpgp_oid_to_curve (curvestr, 1); const char *curvename = openpgp_oid_to_curve (curvestr, 1);
gcry_sexp_release (curve);
err = gcry_sexp_build (&curve, NULL, "(curve %s)", err = gcry_sexp_build (&curve, NULL, "(curve %s)",
curvename?curvename:curvestr); curvename?curvename:curvestr);
xfree (curvestr); xfree (curvestr);