diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bio_lib.c')
| -rw-r--r-- | src/lib/libcrypto/bio/bio_lib.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c index e12bc3a2ca..9c9646afa8 100644 --- a/src/lib/libcrypto/bio/bio_lib.c +++ b/src/lib/libcrypto/bio/bio_lib.c | |||
| @@ -521,40 +521,40 @@ void BIO_free_all(BIO *bio) | |||
| 521 | 521 | ||
| 522 | BIO *BIO_dup_chain(BIO *in) | 522 | BIO *BIO_dup_chain(BIO *in) |
| 523 | { | 523 | { |
| 524 | BIO *ret=NULL,*eoc=NULL,*bio,*new; | 524 | BIO *ret=NULL,*eoc=NULL,*bio,*new_bio; |
| 525 | 525 | ||
| 526 | for (bio=in; bio != NULL; bio=bio->next_bio) | 526 | for (bio=in; bio != NULL; bio=bio->next_bio) |
| 527 | { | 527 | { |
| 528 | if ((new=BIO_new(bio->method)) == NULL) goto err; | 528 | if ((new_bio=BIO_new(bio->method)) == NULL) goto err; |
| 529 | new->callback=bio->callback; | 529 | new_bio->callback=bio->callback; |
| 530 | new->cb_arg=bio->cb_arg; | 530 | new_bio->cb_arg=bio->cb_arg; |
| 531 | new->init=bio->init; | 531 | new_bio->init=bio->init; |
| 532 | new->shutdown=bio->shutdown; | 532 | new_bio->shutdown=bio->shutdown; |
| 533 | new->flags=bio->flags; | 533 | new_bio->flags=bio->flags; |
| 534 | 534 | ||
| 535 | /* This will let SSL_s_sock() work with stdin/stdout */ | 535 | /* This will let SSL_s_sock() work with stdin/stdout */ |
| 536 | new->num=bio->num; | 536 | new_bio->num=bio->num; |
| 537 | 537 | ||
| 538 | if (!BIO_dup_state(bio,(char *)new)) | 538 | if (!BIO_dup_state(bio,(char *)new_bio)) |
| 539 | { | 539 | { |
| 540 | BIO_free(new); | 540 | BIO_free(new_bio); |
| 541 | goto err; | 541 | goto err; |
| 542 | } | 542 | } |
| 543 | 543 | ||
| 544 | /* copy app data */ | 544 | /* copy app data */ |
| 545 | if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_BIO, &new->ex_data, | 545 | if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_BIO, &new_bio->ex_data, |
| 546 | &bio->ex_data)) | 546 | &bio->ex_data)) |
| 547 | goto err; | 547 | goto err; |
| 548 | 548 | ||
| 549 | if (ret == NULL) | 549 | if (ret == NULL) |
| 550 | { | 550 | { |
| 551 | eoc=new; | 551 | eoc=new_bio; |
| 552 | ret=eoc; | 552 | ret=eoc; |
| 553 | } | 553 | } |
| 554 | else | 554 | else |
| 555 | { | 555 | { |
| 556 | BIO_push(eoc,new); | 556 | BIO_push(eoc,new_bio); |
| 557 | eoc=new; | 557 | eoc=new_bio; |
| 558 | } | 558 | } |
| 559 | } | 559 | } |
| 560 | return(ret); | 560 | return(ret); |
