From 03123011437bd8754a7c5525971eebdb9c2968db Mon Sep 17 00:00:00 2001 From: Fumitoshi Ukai Date: Thu, 17 Dec 2015 15:26:15 +0900 Subject: [PATCH] avoid calling new/malloc in signalhandler. FlushLogFilesUnsafe would be called in FailureSignalHandler, so should avoid calling new/malloc, which are not signal safe. fixes #78 --- src/logging.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logging.cc b/src/logging.cc index b7c2f4cb9..982a3089e 100644 --- a/src/logging.cc +++ b/src/logging.cc @@ -572,7 +572,7 @@ inline void LogDestination::FlushLogFilesUnsafe(int min_severity) { // assume we have the log_mutex or we simply don't care // about it for (int i = min_severity; i < NUM_SEVERITIES; i++) { - LogDestination* log = log_destination(i); + LogDestination* log = log_destinations_[i]; if (log != NULL) { // Flush the base fileobject_ logger directly instead of going // through any wrappers to reduce chance of deadlock.