From 717b7dad6445433c204424f5f3e3ef92aa99e838 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 19 Jul 2015 00:56:49 +0000 Subject: abort when ENGINE_remove fails, fix Coverity 21656 ok doug@, beck@ --- lib/libcrypto/engine/eng_list.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3