summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbcook <>2015-07-19 00:56:48 +0000
committerbcook <>2015-07-19 00:56:48 +0000
commit591df63d95caba9db2372028caaba50b9d296e33 (patch)
treee492ce9ffb9423ee412798a335a461ada1eb911d /src
parent310fa0ab1bf7e6d6f3f72822da4f9283d737ed97 (diff)
downloadopenbsd-591df63d95caba9db2372028caaba50b9d296e33.tar.gz
openbsd-591df63d95caba9db2372028caaba50b9d296e33.tar.bz2
openbsd-591df63d95caba9db2372028caaba50b9d296e33.zip
abort when ENGINE_remove fails, fix Coverity 21656
ok doug@, beck@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/engine/eng_list.c7
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_list.c7
2 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c
index 30f09adc73..fc1d16b183 100644
--- a/src/lib/libcrypto/engine/eng_list.c
+++ b/src/lib/libcrypto/engine/eng_list.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_list.c,v 1.20 2015/06/19 06:32:43 bcook Exp $ */ 1/* $OpenBSD: eng_list.c,v 1.21 2015/07/19 00:56:48 bcook Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -92,11 +92,8 @@ engine_list_cleanup(void)
92{ 92{
93 ENGINE *iterator = engine_list_head; 93 ENGINE *iterator = engine_list_head;
94 94
95 while (iterator != NULL) { 95 while (iterator != NULL && ENGINE_remove(iterator))
96 ENGINE_remove(iterator);
97 iterator = engine_list_head; 96 iterator = engine_list_head;
98 }
99 return;
100} 97}
101 98
102/* These static functions starting with a lower case "engine_" always 99/* These static functions starting with a lower case "engine_" always
diff --git a/src/lib/libssl/src/crypto/engine/eng_list.c b/src/lib/libssl/src/crypto/engine/eng_list.c
index 30f09adc73..fc1d16b183 100644
--- a/src/lib/libssl/src/crypto/engine/eng_list.c
+++ b/src/lib/libssl/src/crypto/engine/eng_list.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_list.c,v 1.20 2015/06/19 06:32:43 bcook Exp $ */ 1/* $OpenBSD: eng_list.c,v 1.21 2015/07/19 00:56:48 bcook Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -92,11 +92,8 @@ engine_list_cleanup(void)
92{ 92{
93 ENGINE *iterator = engine_list_head; 93 ENGINE *iterator = engine_list_head;
94 94
95 while (iterator != NULL) { 95 while (iterator != NULL && ENGINE_remove(iterator))
96 ENGINE_remove(iterator);
97 iterator = engine_list_head; 96 iterator = engine_list_head;
98 }
99 return;
100} 97}
101 98
102/* These static functions starting with a lower case "engine_" always 99/* These static functions starting with a lower case "engine_" always