summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecp_nistp256.c
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2016-01-14 01:51:17 +0100
committerViktor Dukhovni <openssl-users@dukhovni.org>2016-01-14 01:58:57 +0100
commitb098dcae66433efc4c073ca2cc5fc64cdf8a613e (patch)
treec3471541000c35a069df33c513f0041b8609718b /crypto/ec/ecp_nistp256.c
parentAdd a directry spec for mcr if there is none (diff)
downloadopenssl-b098dcae66433efc4c073ca2cc5fc64cdf8a613e.tar.xz
openssl-b098dcae66433efc4c073ca2cc5fc64cdf8a613e.zip
Fix double-free bugs in EC group precomputation state
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/ec/ecp_nistp256.c')
-rw-r--r--crypto/ec/ecp_nistp256.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c
index 26c1693778..11bde8a50f 100644
--- a/crypto/ec/ecp_nistp256.c
+++ b/crypto/ec/ecp_nistp256.c
@@ -2185,6 +2185,7 @@ int ec_GFp_nistp256_precompute_mult(EC_GROUP *group, BN_CTX *ctx)
/* throw away old precomputation */
EC_nistp256_pre_comp_free(group->pre_comp.nistp256);
+ group->pre_comp.nistp256 = NULL;
if (ctx == NULL)
if ((ctx = new_ctx = BN_CTX_new()) == NULL)
return 0;