cipher: fix another memory leak.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 6 Aug 2013 05:38:51 +0000 (14:38 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 6 Aug 2013 05:38:51 +0000 (14:38 +0900)
* cipher/ecc.c (ecc_get_curve): Free TMP.

cipher/ecc.c

index 375eeaf..b694d76 100644 (file)
@@ -1319,6 +1319,7 @@ ecc_get_curve (gcry_mpi_t *pkey, int iterator, unsigned int *r_nbits)
                           tmp = scanval (domain_parms[idx].g_y);
                           if (!mpi_cmp (tmp, E.G.y))
                             {
+                              mpi_free (tmp);
                               result = domain_parms[idx].desc;
                               if (r_nbits)
                                 *r_nbits = domain_parms[idx].nbits;