From 60025c0818ec1419fdaebf0463124037e228d1a0 Mon Sep 17 00:00:00 2001 From: Sergiu Deitsch Date: Sat, 30 Dec 2023 23:02:18 +0100 Subject: [PATCH] wip --- src/glog/logging.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glog/logging.h b/src/glog/logging.h index b69fc506e..daa523d4e 100644 --- a/src/glog/logging.h +++ b/src/glog/logging.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -590,12 +591,13 @@ DECLARE_string(logmailer); FORMAT_MESSAGE_FROM_SYSTEM | \ FORMAT_MESSAGE_IGNORE_INSERTS, \ 0, result, 0, msg, 100, nullptr); \ + std::unique_ptr release(message, \ + &LocalFree); \ if (message_length > 0) { \ google::LogMessage(__FILE__, __LINE__, google::GLOG_ERROR, 0, \ &google::LogMessage::SendToLog) \ .stream() \ << reinterpret_cast(message); \ - LocalFree(message); \ } \ } #endif