Changeset 808 for openssl/trunk/crypto/bio/bio_lib.c
- Timestamp:
- Aug 7, 2014, 8:25:37 PM (11 years ago)
- Location:
- openssl/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
openssl/trunk ¶
- Property svn:mergeinfo changed
/openssl/vendor/1.0.0-current (added) merged: 799-800,804 /openssl/vendor/1.0.0n (added) merged: 807
- Property svn:mergeinfo changed
-
TabularUnified openssl/trunk/crypto/bio/bio_lib.c ¶
r150 r808 111 111 int BIO_free(BIO *a) 112 112 { 113 int ret=0,i;113 int i; 114 114 115 115 if (a == NULL) return(0); … … 133 133 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data); 134 134 135 if ((a->method == NULL) || (a->method->destroy == NULL)) return(1);136 ret=a->method->destroy(a);135 if ((a->method != NULL) && (a->method->destroy != NULL)) 136 a->method->destroy(a); 137 137 OPENSSL_free(a); 138 138 return(1); … … 522 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 526 for (bio=in; bio != NULL; bio=bio->next_bio) 527 527 { 528 if ((new =BIO_new(bio->method)) == NULL) goto err;529 new ->callback=bio->callback;530 new ->cb_arg=bio->cb_arg;531 new ->init=bio->init;532 new ->shutdown=bio->shutdown;533 new ->flags=bio->flags;528 if ((new_bio=BIO_new(bio->method)) == NULL) goto err; 529 new_bio->callback=bio->callback; 530 new_bio->cb_arg=bio->cb_arg; 531 new_bio->init=bio->init; 532 new_bio->shutdown=bio->shutdown; 533 new_bio->flags=bio->flags; 534 534 535 535 /* This will let SSL_s_sock() work with stdin/stdout */ 536 new ->num=bio->num;537 538 if (!BIO_dup_state(bio,(char *)new ))536 new_bio->num=bio->num; 537 538 if (!BIO_dup_state(bio,(char *)new_bio)) 539 539 { 540 BIO_free(new );540 BIO_free(new_bio); 541 541 goto err; 542 542 } 543 543 544 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 546 &bio->ex_data)) 547 547 goto err; … … 549 549 if (ret == NULL) 550 550 { 551 eoc=new ;551 eoc=new_bio; 552 552 ret=eoc; 553 553 } 554 554 else 555 555 { 556 BIO_push(eoc,new );557 eoc=new ;556 BIO_push(eoc,new_bio); 557 eoc=new_bio; 558 558 } 559 559 }
Note:
See TracChangeset
for help on using the changeset viewer.