Skip to content

Commit

Permalink
cmp_kemrsa.c: fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeev-0 committed Jan 6, 2024
1 parent d9826ec commit aeceaf2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crypto/cmp/cmp_kemrsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ X509_ALGOR *ossl_cmp_rsakem_algor(OSSL_CMP_CTX *ctx)
ASN1_STRING *stmp = NULL;

if ((param = OSSL_CMP_RSAKEMPARAMETERS_new()) == NULL
|| (param->KeyDerivationFunction
= ossl_cmp_kem_kdf_algor(ctx, NID_id_kdf_kdf2)) == NULL
|| !ossl_cmp_x509_algor_set0(&param->KeyDerivationFunction,
ossl_cmp_kem_kdf_algor(ctx,
NID_id_kdf_kdf2))
|| !ASN1_INTEGER_set(param->KeyLength, RSAKEM_KEYLENGTH))
goto err;

Expand Down

0 comments on commit aeceaf2

Please sign in to comment.