Eliminated spammy log messages from backtrace functions

This commit is contained in:
akallabeth 2021-09-17 08:52:47 +02:00 committed by akallabeth
parent 162227ce78
commit b69156d79c

View File

@ -260,10 +260,7 @@ USHORT RtlCaptureStackBackTrace(ULONG FramesToSkip, ULONG FramesToCapture, PVOID
void winpr_backtrace_free(void* buffer) void winpr_backtrace_free(void* buffer)
{ {
if (!buffer) if (!buffer)
{
LOGF(support_msg);
return; return;
}
#if defined(HAVE_EXECINFO_H) #if defined(HAVE_EXECINFO_H)
t_execinfo* data = (t_execinfo*)buffer; t_execinfo* data = (t_execinfo*)buffer;
@ -517,8 +514,7 @@ void winpr_log_backtrace_ex(wLog* log, DWORD level, DWORD size)
if (!stack) if (!stack)
{ {
WLog_Print(log, WLOG_ERROR, "winpr_backtrace failed!\n"); WLog_Print(log, WLOG_ERROR, "winpr_backtrace failed!\n");
winpr_backtrace_free(stack); goto fail;
return;
} }
msg = winpr_backtrace_symbols(stack, &used); msg = winpr_backtrace_symbols(stack, &used);
@ -530,6 +526,7 @@ void winpr_log_backtrace_ex(wLog* log, DWORD level, DWORD size)
} }
free(msg); free(msg);
fail:
winpr_backtrace_free(stack); winpr_backtrace_free(stack);
} }