diff --git a/crypto/dh/dh.c b/crypto/dh/dh.c index 04e245e8..7b7b8335 100644 --- a/crypto/dh/dh.c +++ b/crypto/dh/dh.c @@ -167,7 +167,7 @@ int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) { dh->q = q; } - if (g == NULL) { + if (g != NULL) { BN_free(dh->g); dh->g = g; }