aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-03-26 18:59:45 +0000
committerRoger Dingledine <arma@torproject.org>2008-03-26 18:59:45 +0000
commite9221f4a0d01bd6fb7761cdb76af9870575c002a (patch)
tree115fb8fe621fc9f7c8c613007c0fc5f0f94a2c8d /src
parent8dfccf6145dd63dc88e3a5862c2b53ac9aafd0d1 (diff)
downloadtor-e9221f4a0d01bd6fb7761cdb76af9870575c002a.tar
tor-e9221f4a0d01bd6fb7761cdb76af9870575c002a.tar.gz
fix a leak when adding a temp log
svn:r14203
Diffstat (limited to 'src')
-rw-r--r--src/common/log.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/log.c b/src/common/log.c
index c5be18220..aa13db9f0 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -539,6 +539,7 @@ add_temp_log(void)
set_log_severity_config(LOG_NOTICE, LOG_ERR, s);
LOCK_LOGS();
add_stream_log_impl(s, "<temp>", stdout);
+ tor_free(s);
logfiles->is_temporary = 1;
UNLOCK_LOGS();
}
@@ -583,7 +584,8 @@ change_callback_log_severity(int loglevelMin, int loglevelMax,
UNLOCK_LOGS();
}
-/** Close any log handlers added by add_temp_log or marked by mark_logs_temp */
+/** Close any log handlers added by add_temp_log() or marked by
+ * mark_logs_temp(). */
void
close_temp_logs(void)
{
@@ -619,7 +621,7 @@ rollback_log_changes(void)
close_temp_logs();
}
-/** Configure all log handles to be closed by close_temp_logs */
+/** Configure all log handles to be closed by close_temp_logs(). */
void
mark_logs_temp(void)
{