[openssl] openssl-3.0 update

tomas at openssl.org tomas at openssl.org
Fri Oct 15 06:56:52 UTC 2021


The branch openssl-3.0 has been updated
       via  f9c48239879a870b9d43ccd05f659f6355831139 (commit)
      from  4c60a96e1ed4c6f2c23c1e0eab006224e959e06c (commit)


- Log -----------------------------------------------------------------
commit f9c48239879a870b9d43ccd05f659f6355831139
Author: Peiwei Hu <jlu.hpw at foxmail.com>
Date:   Tue Oct 12 10:50:12 2021 +0800

    test/ssl_old_test.c: Fix potential leak
    
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16806)
    
    (cherry picked from commit 34563be5368fb8e6ade7d06d8376522ba83cd6ac)

-----------------------------------------------------------------------

Summary of changes:
 test/ssl_old_test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/ssl_old_test.c b/test/ssl_old_test.c
index 60a275a014..3ccc8e06e4 100644
--- a/test/ssl_old_test.c
+++ b/test/ssl_old_test.c
@@ -829,12 +829,14 @@ static SSL_SESSION *read_session(const char *filename)
 
 static int write_session(const char *filename, SSL_SESSION *sess)
 {
-    BIO *f = BIO_new_file(filename, "w");
+    BIO *f;
 
     if (sess == NULL) {
         BIO_printf(bio_err, "No session information\n");
         return 0;
     }
+
+    f = BIO_new_file(filename, "w");
     if (f == NULL) {
         BIO_printf(bio_err, "Can't open session file %s\n", filename);
         ERR_print_errors(bio_err);


More information about the openssl-commits mailing list