Skip to content

Commit

Permalink
Fix memory leaks and double deletes
Browse files Browse the repository at this point in the history
They are reported from the runtime checks on EL9
  • Loading branch information
giacomini committed Mar 8, 2023
1 parent 0d6d98c commit 25b39ed
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sslutils/sslutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,14 +767,21 @@ proxy_genreq(
if (RSA_generate_key_ex(rsa, rbits, rsa_exp, cb))
{
BN_free(rsa_exp);
rsa_exp = NULL;
BN_GENCB_free(cb);
cb = NULL;
}
else
{
PRXYerr(PRXYERR_F_PROXY_GENREQ,PRXYERR_R_PROCESS_PROXY_KEY);
goto err;
}

if (!EVP_PKEY_assign_RSA(pkey,rsa))
if (EVP_PKEY_assign_RSA(pkey,rsa))
{
rsa = NULL;
}
else
{
PRXYerr(PRXYERR_F_PROXY_GENREQ,PRXYERR_R_PROCESS_PROXY_KEY);
goto err;
Expand Down

0 comments on commit 25b39ed

Please # to comment.