提交 4a18cddd 编写于 作者: B Ben Laurie

Only free if it ain't NULL.

上级 bb65e20b
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
Changes between 0.9.1c and 0.9.2 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. *) BIO_s_socket() had a broken should_retry() on Windoze.
[Arne Ansper <arne@ats.cyber.ee>] [Arne Ansper <arne@ats.cyber.ee>]
......
...@@ -474,7 +474,8 @@ RSA *rsa; ...@@ -474,7 +474,8 @@ RSA *rsa;
err: err:
BN_clear_free(&m1); BN_clear_free(&m1);
BN_clear_free(&r1); BN_clear_free(&r1);
BN_CTX_free(ctx); if(ctx)
BN_CTX_free(ctx);
return(ret); return(ret);
} }
......
...@@ -531,7 +531,8 @@ RSA *rsa; ...@@ -531,7 +531,8 @@ RSA *rsa;
err: err:
if (m1 != NULL) BN_free(m1); if (m1 != NULL) BN_free(m1);
if (r1 != NULL) BN_free(r1); if (r1 != NULL) BN_free(r1);
BN_CTX_free(ctx); if(ctx != NULL)
BN_CTX_free(ctx);
return(ret); return(ret);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册