Преглед изворни кода

Fix a memleak in ec_GFp_mont_group_set_curve.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3828)
Bernd Edlinger пре 7 година
родитељ
комит
953a1665e2
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      crypto/ec/ecp_mont.c

+ 2 - 0
crypto/ec/ecp_mont.c

@@ -247,6 +247,8 @@ int ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p,
         BN_CTX_free(new_ctx);
     if (mont != NULL)
         BN_MONT_CTX_free(mont);
+    if (one != NULL)
+        BN_free(one);
     return ret;
 }