Only free if it ain't NULL.

This commit is contained in:
Ben Laurie 1999-01-04 21:39:34 +00:00
parent bb65e20b1c
commit 4a18cddd16
3 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,9 @@
Changes between 0.9.1c and 0.9.2
*) rsa_eay.c would attempt to free a NULL context.
[Arne Ansper <arne@ats.cyber.ee>]
*) BIO_s_socket() had a broken should_retry() on Windoze.
[Arne Ansper <arne@ats.cyber.ee>]

View File

@ -474,7 +474,8 @@ RSA *rsa;
err:
BN_clear_free(&m1);
BN_clear_free(&r1);
BN_CTX_free(ctx);
if(ctx)
BN_CTX_free(ctx);
return(ret);
}

View File

@ -531,7 +531,8 @@ RSA *rsa;
err:
if (m1 != NULL) BN_free(m1);
if (r1 != NULL) BN_free(r1);
BN_CTX_free(ctx);
if(ctx != NULL)
BN_CTX_free(ctx);
return(ret);
}