Also, the "to" variable used in cleanup is never non-NULL and is entirely
unused. As such, the cleanup might have been missed under genuine error
conditions and caused leaks and/or returned invalid pointers.
if (CRYPTO_add(&bio->references,1,CRYPTO_LOCK_BIO) > 1)
logstream = bio;
else
- ENGINEerr(ENGINE_F_HWCRHK_CTRL,ENGINE_R_BIO_WAS_FREED);
+ ENGINEerr(ENGINE_F_SUREWAREHK_CTRL,ENGINE_R_BIO_WAS_FREED);
}
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
break;
{
int ret=0;
char *hptr=NULL;
- unsigned char *to=NULL;
DSA_SIG *psign=NULL;
char msg[64]="ENGINE_dsa_do_sign";
if (!p_surewarehk_Dsa_Sign)
bn_fix_top(psign->s);
err:
- if (to)
+ if (psign)
{
DSA_SIG_free(psign);
psign=NULL;