[openssl-commits] [openssl] master update
matthias.st.pierre at ncp-e.com
matthias.st.pierre at ncp-e.com
Tue Apr 10 11:38:13 UTC 2018
The branch master has been updated
via 63a65d16acca53622a08861cdde8fe0e79beb522 (commit)
from 55bd917bc4213bc668f48b87d8c6feb9918fef8f (commit)
- Log -----------------------------------------------------------------
commit 63a65d16acca53622a08861cdde8fe0e79beb522
Author: Dr. Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
Date: Sun Apr 8 12:09:10 2018 +0200
DRBG: fix memory leak on error in rand_drbg_get_entropy()
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5918)
-----------------------------------------------------------------------
Summary of changes:
crypto/rand/rand_lib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index 3589e75..6e98e4d 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -229,7 +229,7 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg,
*/
RANDerr(RAND_F_RAND_DRBG_GET_ENTROPY,
RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED);
- return 0;
+ goto err;
}
/* Get entropy by polling system entropy sources. */
@@ -241,6 +241,7 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg,
*pout = rand_pool_detach(pool);
}
+ err:
rand_pool_free(pool);
return ret;
}
More information about the openssl-commits
mailing list