summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFumitoshi Ukai <ukai@google.com>2015-12-17 06:26:15 (GMT)
committerFumitoshi Ukai <ukai@google.com>2015-12-17 06:26:15 (GMT)
commit03123011437bd8754a7c5525971eebdb9c2968db (patch)
treef10005b8557e57c2c675dec0b161b0df071630ce /src
parentde75983a8172e078a1cc07ad0a10908629bcc0bd (diff)
downloadglog-03123011437bd8754a7c5525971eebdb9c2968db.zip
glog-03123011437bd8754a7c5525971eebdb9c2968db.tar.gz
glog-03123011437bd8754a7c5525971eebdb9c2968db.tar.bz2
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
Diffstat (limited to 'src')
-rw-r--r--src/logging.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/logging.cc b/src/logging.cc
index b7c2f4c..982a308 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.