Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-04-13 21:04:03 +0300
committerAdam Langley <agl@google.com>2015-04-14 23:04:52 +0300
commit9bde6aeb76b1d2a45d76637553c3fb3f31e4ecbd (patch)
tree254c4082954ed0a4ae6fa25618bb031da4b5b00f /crypto/bio
parent1f26ed767a0847ade757b24489b1b488eabbfee9 (diff)
bio: remove reference count.
It appears that this reference “count” is set to one at creation and never touched after that. Change-Id: I3238a6d3dd702953771b8ec725c1c5712c648fba Reviewed-on: https://boringssl-review.googlesource.com/4320 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/bio.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/crypto/bio/bio.c b/crypto/bio/bio.c
index 4a077623..be3cc215 100644
--- a/crypto/bio/bio.c
+++ b/crypto/bio/bio.c
@@ -75,7 +75,6 @@ static int bio_set(BIO *bio, const BIO_METHOD *method) {
bio->method = method;
bio->shutdown = 1;
- bio->references = 1;
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data)) {
return 0;
@@ -110,11 +109,6 @@ int BIO_free(BIO *bio) {
BIO *next_bio;
for (; bio != NULL; bio = next_bio) {
- int refs = CRYPTO_add(&bio->references, -1, CRYPTO_LOCK_BIO);
- if (refs > 0) {
- return 0;
- }
-
if (bio->callback != NULL) {
int i = (int)bio->callback(bio, BIO_CB_FREE, NULL, 0, 0, 1);
if (i <= 0) {