Only cleanse sbuf if it is not NULL.
PR#2339
This commit is contained in:
parent
114216bca0
commit
6ea511211c
1 changed files with 5 additions and 2 deletions
|
@ -288,8 +288,11 @@ int FIPS_rsa_sign_digest(RSA *rsa, const unsigned char *md, int md_len,
|
|||
*siglen=j;
|
||||
}
|
||||
psserr:
|
||||
OPENSSL_cleanse(sbuf, i);
|
||||
OPENSSL_free(sbuf);
|
||||
if (sbuf)
|
||||
{
|
||||
OPENSSL_cleanse(sbuf, i);
|
||||
OPENSSL_free(sbuf);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue