g10: Fix memory leak.
authorJustus Winter <justus@g10code.com>
Fri, 1 Jul 2016 11:43:01 +0000 (13:43 +0200)
committerJustus Winter <justus@g10code.com>
Fri, 1 Jul 2016 11:43:01 +0000 (13:43 +0200)
* g10/import.c (transfer_secret_keys): Release curve from the previous
iteration.

Signed-off-by: Justus Winter <justus@g10code.com>
g10/import.c

index b6bc0f2..332e266 100644 (file)
@@ -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);