"sureware" should not be "hwcrhk".

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.
This commit is contained in:
Geoff Thorpe
2001-11-15 02:51:01 +00:00
parent 2395368e7f
commit b0eda65f1c

View File

@@ -307,7 +307,7 @@ static int surewarehk_ctrl(int cmd, long i, void *p, void (*f)())
if (CRYPTO_add(&bio->references,1,CRYPTO_LOCK_BIO) > 1) if (CRYPTO_add(&bio->references,1,CRYPTO_LOCK_BIO) > 1)
logstream = bio; logstream = bio;
else 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); CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
break; break;
@@ -835,7 +835,6 @@ static DSA_SIG * surewarehk_dsa_do_sign(const unsigned char *from, int flen, DSA
{ {
int ret=0; int ret=0;
char *hptr=NULL; char *hptr=NULL;
unsigned char *to=NULL;
DSA_SIG *psign=NULL; DSA_SIG *psign=NULL;
char msg[64]="ENGINE_dsa_do_sign"; char msg[64]="ENGINE_dsa_do_sign";
if (!p_surewarehk_Dsa_Sign) if (!p_surewarehk_Dsa_Sign)
@@ -870,7 +869,7 @@ static DSA_SIG * surewarehk_dsa_do_sign(const unsigned char *from, int flen, DSA
bn_fix_top(psign->s); bn_fix_top(psign->s);
err: err:
if (to) if (psign)
{ {
DSA_SIG_free(psign); DSA_SIG_free(psign);
psign=NULL; psign=NULL;