On Tue, Jul 08, 2014 at 08:03:39AM +0200, Neitrino Photonov via RT wrote:
> if haven't method destroy memory for a is never free.
diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c
index 9c9646a..d6950ad 100644
--- a/crypto/bio/bio_lib.c
+++ b/crypto/bio/bio_lib.c
@@ -132,8 +132,8 @@ int BIO_free(BIO *a)
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
- if ((a->method == NULL) || (a->method->destroy == NULL)) return(1);
- a->method->destroy(a);
+ if (a->method && a->method->destroy)
+ a->method->destroy(a);
OPENSSL_free(a);
return(1);
}
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]