From 1bf7cad633a5633cb331e7d579e8c47923eb048a Mon Sep 17 00:00:00 2001 From: David Garske Date: Tue, 25 Sep 2018 16:13:13 -0700 Subject: [PATCH] Fix for case where `wc_ClearErrorNodes` is called, but then `wc_PullErrorNode` is called and `wc_current_node` is populated with invalid ->next pointer. --- wolfcrypt/src/logging.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/logging.c b/wolfcrypt/src/logging.c index ecc64c460..03d199866 100644 --- a/wolfcrypt/src/logging.c +++ b/wolfcrypt/src/logging.c @@ -677,8 +677,9 @@ void wc_ClearErrorNodes(void) } } - wc_errors = NULL; - wc_last_node = NULL; + wc_errors = NULL; + wc_last_node = NULL; + wc_current_node = NULL; wc_UnLockMutex(&debug_mutex); #endif /* DEBUG_WOLFSSL || WOLFSSL_NGINX */ }