From 484887bb471430ca55befb4cc64954a70c4a6eb9 Mon Sep 17 00:00:00 2001 From: beck <> Date: Mon, 19 Oct 2015 17:59:39 +0000 Subject: free rbio before wbio ok jsing@ --- src/lib/libssl/src/ssl/ssl_lib.c | 14 +++++++------- src/lib/libssl/ssl_lib.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src') 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 @@ -/* $OpenBSD: ssl_lib.c,v 1.114 2015/10/16 14:23:22 beck Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.115 2015/10/19 17:59:39 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -503,9 +503,9 @@ SSL_free(SSL *s) s->bbio = NULL; } - if (s->wbio != s->rbio) - BIO_free_all(s->wbio); - BIO_free_all(s->rbio); + if (s->rbio != s->wbio) + BIO_free_all(s->rbio); + BIO_free_all(s->wbio); if (s->init_buf != NULL) BUF_MEM_free(s->init_buf); @@ -572,10 +572,10 @@ SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) } } - if ((s->wbio != wbio) && (s->rbio != s->wbio)) - BIO_free_all(s->wbio); - if (s->rbio != rbio) + if (s->rbio != rbio && s->rbio != s->wbio) BIO_free_all(s->rbio); + if (s->wbio != wbio) + BIO_free_all(s->wbio); s->rbio = rbio; s->wbio = wbio; } 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 @@ -/* $OpenBSD: ssl_lib.c,v 1.114 2015/10/16 14:23:22 beck Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.115 2015/10/19 17:59:39 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -503,9 +503,9 @@ SSL_free(SSL *s) s->bbio = NULL; } - if (s->wbio != s->rbio) - BIO_free_all(s->wbio); - BIO_free_all(s->rbio); + if (s->rbio != s->wbio) + BIO_free_all(s->rbio); + BIO_free_all(s->wbio); if (s->init_buf != NULL) BUF_MEM_free(s->init_buf); @@ -572,10 +572,10 @@ SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) } } - if ((s->wbio != wbio) && (s->rbio != s->wbio)) - BIO_free_all(s->wbio); - if (s->rbio != rbio) + if (s->rbio != rbio && s->rbio != s->wbio) BIO_free_all(s->rbio); + if (s->wbio != wbio) + BIO_free_all(s->wbio); s->rbio = rbio; s->wbio = wbio; } -- cgit v1.2.3-55-g6feb