X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fdh%2Fdh_pmeth.c;h=668f5f3a87e547c1b62cad719fe3c88c2cd63006;hp=8975f4492a124bb735b496362592d76c5d5701c5;hb=0dfb9398bb6493d5a56216e0c7039cb3f9fc88c6;hpb=7c82e339a677f8546e1456c7a8f6788598a9de43 diff --git a/crypto/dh/dh_pmeth.c b/crypto/dh/dh_pmeth.c index 8975f4492a..668f5f3a87 100644 --- a/crypto/dh/dh_pmeth.c +++ b/crypto/dh/dh_pmeth.c @@ -155,8 +155,7 @@ static void pkey_dh_cleanup(EVP_PKEY_CTX *ctx) if (dctx) { if (dctx->kdf_ukm) OPENSSL_free(dctx->kdf_ukm); - if (dctx->kdf_oid) - ASN1_OBJECT_free(dctx->kdf_oid); + ASN1_OBJECT_free(dctx->kdf_oid); OPENSSL_free(dctx); } } @@ -245,8 +244,7 @@ static int pkey_dh_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) return dctx->kdf_ukmlen; case EVP_PKEY_CTRL_DH_KDF_OID: - if (dctx->kdf_oid) - ASN1_OBJECT_free(dctx->kdf_oid); + ASN1_OBJECT_free(dctx->kdf_oid); dctx->kdf_oid = p2; return 1;