[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
bernd.edlinger at hotmail.de
bernd.edlinger at hotmail.de
Sat Mar 3 19:00:00 UTC 2018
The branch OpenSSL_1_1_0-stable has been updated
via 2a501ce23b47ce8c37cb098c8ce862f6f2865b03 (commit)
from d440216426da5e46cdb6c57742727e23c7d12891 (commit)
- Log -----------------------------------------------------------------
commit 2a501ce23b47ce8c37cb098c8ce862f6f2865b03
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Fri Mar 2 09:27:39 2018 +0100
Fix a possible memory leak in engine_table_register
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5489)
(cherry picked from commit 55a7f77d72930f9aee1a51e0af9658b2728be127)
-----------------------------------------------------------------------
Summary of changes:
crypto/engine/eng_table.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/crypto/engine/eng_table.c b/crypto/engine/eng_table.c
index 219253a..ffdecb9 100644
--- a/crypto/engine/eng_table.c
+++ b/crypto/engine/eng_table.c
@@ -109,6 +109,11 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
}
fnd->funct = NULL;
(void)lh_ENGINE_PILE_insert(&(*table)->piles, fnd);
+ if (lh_ENGINE_PILE_retrieve(&(*table)->piles, &tmplate) != fnd) {
+ sk_ENGINE_free(fnd->sk);
+ OPENSSL_free(fnd);
+ goto end;
+ }
}
/* A registration shouldn't add duplicate entries */
(void)sk_ENGINE_delete_ptr(fnd->sk, e);
More information about the openssl-commits
mailing list