From c454922ffa71929c810c6ff048d902498575302f Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 1 Jul 2016 13:43:01 +0200 Subject: [PATCH] g10: Fix memory leak. * g10/import.c (transfer_secret_keys): Release curve from the previous iteration. Signed-off-by: Justus Winter --- g10/import.c | 1 + 1 file changed, 1 insertion(+) diff --git a/g10/import.c b/g10/import.c index b6bc0f28a..332e2667a 100644 --- a/g10/import.c +++ b/g10/import.c @@ -1524,6 +1524,7 @@ transfer_secret_keys (ctrl_t ctrl, struct import_stats_s *stats, else { const char *curvename = openpgp_oid_to_curve (curvestr, 1); + gcry_sexp_release (curve); err = gcry_sexp_build (&curve, NULL, "(curve %s)", curvename?curvename:curvestr); xfree (curvestr);