aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/jpake/jpake.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/jpake/jpake.c')
-rw-r--r--crypto/jpake/jpake.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/jpake/jpake.c b/crypto/jpake/jpake.c
index 8c38727e20fd..ebc09755756d 100644
--- a/crypto/jpake/jpake.c
+++ b/crypto/jpake/jpake.c
@@ -219,6 +219,9 @@ static int verify_zkp(const JPAKE_STEP_PART *p, const BIGNUM *zkpg,
BIGNUM *t3 = BN_new();
int ret = 0;
+ if (h == NULL || t1 == NULL || t2 == NULL || t3 == NULL)
+ goto end;
+
zkp_hash(h, zkpg, p, ctx->p.peer_name);
/* t1 = g^b */
@@ -234,6 +237,7 @@ static int verify_zkp(const JPAKE_STEP_PART *p, const BIGNUM *zkpg,
else
JPAKEerr(JPAKE_F_VERIFY_ZKP, JPAKE_R_ZKP_VERIFY_FAILED);
+end:
/* cleanup */
BN_free(t3);
BN_free(t2);