diff options
author | beck <> | 2015-10-19 17:59:39 +0000 |
---|---|---|
committer | beck <> | 2015-10-19 17:59:39 +0000 |
commit | 484887bb471430ca55befb4cc64954a70c4a6eb9 (patch) | |
tree | e1227766c63c507f02add141cca927253151f8ae | |
parent | 6aaacba0f3b85544831ba081481b2846d94927ac (diff) | |
download | openbsd-484887bb471430ca55befb4cc64954a70c4a6eb9.tar.gz openbsd-484887bb471430ca55befb4cc64954a70c4a6eb9.tar.bz2 openbsd-484887bb471430ca55befb4cc64954a70c4a6eb9.zip |
free rbio before wbio
ok jsing@
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_lib.c | 14 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index 6479f729e7..d37f305387 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.114 2015/10/16 14:23:22 beck Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.115 2015/10/19 17:59:39 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -503,9 +503,9 @@ SSL_free(SSL *s) | |||
503 | s->bbio = NULL; | 503 | s->bbio = NULL; |
504 | } | 504 | } |
505 | 505 | ||
506 | if (s->wbio != s->rbio) | 506 | if (s->rbio != s->wbio) |
507 | BIO_free_all(s->wbio); | 507 | BIO_free_all(s->rbio); |
508 | BIO_free_all(s->rbio); | 508 | BIO_free_all(s->wbio); |
509 | 509 | ||
510 | if (s->init_buf != NULL) | 510 | if (s->init_buf != NULL) |
511 | BUF_MEM_free(s->init_buf); | 511 | BUF_MEM_free(s->init_buf); |
@@ -572,10 +572,10 @@ SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) | |||
572 | } | 572 | } |
573 | } | 573 | } |
574 | 574 | ||
575 | if ((s->wbio != wbio) && (s->rbio != s->wbio)) | 575 | if (s->rbio != rbio && s->rbio != s->wbio) |
576 | BIO_free_all(s->wbio); | ||
577 | if (s->rbio != rbio) | ||
578 | BIO_free_all(s->rbio); | 576 | BIO_free_all(s->rbio); |
577 | if (s->wbio != wbio) | ||
578 | BIO_free_all(s->wbio); | ||
579 | s->rbio = rbio; | 579 | s->rbio = rbio; |
580 | s->wbio = wbio; | 580 | s->wbio = wbio; |
581 | } | 581 | } |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 6479f729e7..d37f305387 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.114 2015/10/16 14:23:22 beck Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.115 2015/10/19 17:59:39 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -503,9 +503,9 @@ SSL_free(SSL *s) | |||
503 | s->bbio = NULL; | 503 | s->bbio = NULL; |
504 | } | 504 | } |
505 | 505 | ||
506 | if (s->wbio != s->rbio) | 506 | if (s->rbio != s->wbio) |
507 | BIO_free_all(s->wbio); | 507 | BIO_free_all(s->rbio); |
508 | BIO_free_all(s->rbio); | 508 | BIO_free_all(s->wbio); |
509 | 509 | ||
510 | if (s->init_buf != NULL) | 510 | if (s->init_buf != NULL) |
511 | BUF_MEM_free(s->init_buf); | 511 | BUF_MEM_free(s->init_buf); |
@@ -572,10 +572,10 @@ SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) | |||
572 | } | 572 | } |
573 | } | 573 | } |
574 | 574 | ||
575 | if ((s->wbio != wbio) && (s->rbio != s->wbio)) | 575 | if (s->rbio != rbio && s->rbio != s->wbio) |
576 | BIO_free_all(s->wbio); | ||
577 | if (s->rbio != rbio) | ||
578 | BIO_free_all(s->rbio); | 576 | BIO_free_all(s->rbio); |
577 | if (s->wbio != wbio) | ||
578 | BIO_free_all(s->wbio); | ||
579 | s->rbio = rbio; | 579 | s->rbio = rbio; |
580 | s->wbio = wbio; | 580 | s->wbio = wbio; |
581 | } | 581 | } |