summaryrefslogtreecommitdiffstats
path: root/crypto/bio
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-01-30 21:49:12 +0000
committerRichard Levitte <levitte@openssl.org>2003-01-30 21:49:12 +0000
commit5d780babe3e0e60e92e41bc38c96963abfe3655f (patch)
treec0df99bd512e1da60ba5d9a597e3c4f1221d0f5b /crypto/bio
parent5cd48abf9f4bf721545abf675e25ea5b2a33a7fb (diff)
A few small bugs with BIO popping.
PR: 364
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/bio_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c
index 98ce395519..692c8fb5c6 100644
--- a/crypto/bio/bio_lib.c
+++ b/crypto/bio/bio_lib.c
@@ -395,6 +395,8 @@ BIO *BIO_pop(BIO *b)
if (b == NULL) return(NULL);
ret=b->next_bio;
+ BIO_ctrl(b,BIO_CTRL_POP,0,NULL);
+
if (b->prev_bio != NULL)
b->prev_bio->next_bio=b->next_bio;
if (b->next_bio != NULL)
@@ -402,7 +404,6 @@ BIO *BIO_pop(BIO *b)
b->next_bio=NULL;
b->prev_bio=NULL;
- BIO_ctrl(b,BIO_CTRL_POP,0,NULL);
return(ret);
}