From b69156d79c84b8d34fec95b0a7e0a0feb9bb2c13 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 17 Sep 2021 08:52:47 +0200 Subject: [PATCH] Eliminated spammy log messages from backtrace functions --- winpr/libwinpr/utils/debug.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/winpr/libwinpr/utils/debug.c b/winpr/libwinpr/utils/debug.c index baa862288..e94bb41e4 100644 --- a/winpr/libwinpr/utils/debug.c +++ b/winpr/libwinpr/utils/debug.c @@ -260,10 +260,7 @@ USHORT RtlCaptureStackBackTrace(ULONG FramesToSkip, ULONG FramesToCapture, PVOID void winpr_backtrace_free(void* buffer) { if (!buffer) - { - LOGF(support_msg); return; - } #if defined(HAVE_EXECINFO_H) t_execinfo* data = (t_execinfo*)buffer; @@ -517,8 +514,7 @@ void winpr_log_backtrace_ex(wLog* log, DWORD level, DWORD size) if (!stack) { WLog_Print(log, WLOG_ERROR, "winpr_backtrace failed!\n"); - winpr_backtrace_free(stack); - return; + goto fail; } msg = winpr_backtrace_symbols(stack, &used); @@ -530,6 +526,7 @@ void winpr_log_backtrace_ex(wLog* log, DWORD level, DWORD size) } free(msg); +fail: winpr_backtrace_free(stack); }