Skip to content

Commit b8f9b06

Browse files
committed
wolfcrypt/src/logging.c: fix recursion in wc_backtrace_render().
1 parent 678660e commit b8f9b06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wolfcrypt/src/logging.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ int wc_backtrace_render(void) {
19391939
int cur_init_count = wolfSSL_Atomic_Int_FetchSub(&init_count, 1);
19401940
if (cur_init_count != 0) {
19411941
(void)wolfSSL_Atomic_Int_FetchAdd(&init_count, 1);
1942-
return DEADLOCK_AVERTED_E;
1942+
return WC_NO_ERR_TRACE(DEADLOCK_AVERTED_E);
19431943
}
19441944
ret = wc_InitMutex(&backtrace_mutex);
19451945
if (ret != 0)
@@ -1960,7 +1960,7 @@ int wc_backtrace_render(void) {
19601960
if (backtrace_state == NULL) {
19611961
if (backtrace_init(&backtrace_state) < 0) {
19621962
wc_UnLockMutex(&backtrace_mutex);
1963-
return BAD_STATE_E;
1963+
return WC_NO_ERR_TRACE(BAD_STATE_E);
19641964
}
19651965
}
19661966

0 commit comments

Comments
 (0)