Unrefcount SSL*.

Nothing ever increments the count.

Change-Id: I0b9396e0f5755fa7d9cfd522e17910c760c1aebd
Reviewed-on: https://boringssl-review.googlesource.com/3360
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2015-02-09 19:56:18 -05:00 committed by Adam Langley
parent 9e128b06a1
commit ed3d302190
2 changed files with 0 additions and 10 deletions

View File

@ -1262,7 +1262,6 @@ struct ssl_st {
/* for server side, keep the list of CA_dn we can use */
STACK_OF(X509_NAME) *client_CA;
int references;
unsigned long options; /* protocol behaviour */
unsigned long mode; /* API behaviour */
long max_cert_list;

View File

@ -345,8 +345,6 @@ SSL *SSL_new(SSL_CTX *ctx) {
s->enc_method = ssl3_get_enc_method(s->version);
assert(s->enc_method != NULL);
s->references = 1;
s->rwstate = SSL_NOTHING;
s->rstate = SSL_ST_READ_HEADER;
@ -547,17 +545,10 @@ X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl) { return ssl->param; }
void SSL_certs_clear(SSL *s) { ssl_cert_clear_certs(s->cert); }
void SSL_free(SSL *s) {
int i;
if (s == NULL) {
return;
}
i = CRYPTO_add(&s->references, -1, CRYPTO_LOCK_SSL);
if (i > 0) {
return;
}
if (s->param) {
X509_VERIFY_PARAM_free(s->param);
}