summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrent Cook <bcook@cvs.openbsd.org>2015-07-19 00:56:49 +0000
committerBrent Cook <bcook@cvs.openbsd.org>2015-07-19 00:56:49 +0000
commit717b7dad6445433c204424f5f3e3ef92aa99e838 (patch)
treeb2bc493810d5f546eae0439f75822ad955fbf857 /lib
parenta230ad6b90d43f3e417212df5783c56bd1ce44e1 (diff)
abort when ENGINE_remove fails, fix Coverity 21656
ok doug@, beck@
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/engine/eng_list.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libcrypto/engine/eng_list.c b/lib/libcrypto/engine/eng_list.c
index 30f09adc736..fc1d16b183e 100644
--- a/lib/libcrypto/engine/eng_list.c
+++ b/lib/libcrypto/engine/eng_list.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eng_list.c,v 1.20 2015/06/19 06:32:43 bcook Exp $ */
+/* $OpenBSD: eng_list.c,v 1.21 2015/07/19 00:56:48 bcook Exp $ */
/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
* project 2000.
*/
@@ -92,11 +92,8 @@ engine_list_cleanup(void)
{
ENGINE *iterator = engine_list_head;
- while (iterator != NULL) {
- ENGINE_remove(iterator);
+ while (iterator != NULL && ENGINE_remove(iterator))
iterator = engine_list_head;
- }
- return;
}
/* These static functions starting with a lower case "engine_" always