[openssl-commits] [openssl] master update

Andy Polyakov appro at openssl.org
Wed Apr 4 18:29:08 UTC 2018


The branch master has been updated
       via  b791355b5c0c474ba1005008e3731a859de0754d (commit)
      from  6228b1dae265bbe6c46457d82b2d14d672af5f46 (commit)


- Log -----------------------------------------------------------------
commit b791355b5c0c474ba1005008e3731a859de0754d
Author: Andy Polyakov <appro at openssl.org>
Date:   Sun Apr 1 18:18:46 2018 +0200

    rand/randfile.c: fix potential resource leak in RAND_load_file.
    
    Found by Coverity.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5834)

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

Summary of changes:
 crypto/rand/randfile.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c
index 3a62b88..c652ddc 100644
--- a/crypto/rand/randfile.c
+++ b/crypto/rand/randfile.c
@@ -94,6 +94,7 @@ int RAND_load_file(const char *file, long bytes)
     if (fstat(fileno(in), &sb) < 0) {
         RANDerr(RAND_F_RAND_LOAD_FILE, RAND_R_INTERNAL_ERROR);
         ERR_add_error_data(2, "Filename=", file);
+        fclose(in);
         return -1;
     }
 


More information about the openssl-commits mailing list