summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@banu.com>2008-03-30 17:51:51 -0700
committerMukund Sivaraman <muks@banu.com>2008-03-30 17:51:51 -0700
commitff72f5426e216ac9a897462f010abdf7a2f0ab90 (patch)
treea096e674cb26b9333aff9e90f4ed0f274f5dd34b /src
parent12501d599cafa3774bec6ed6d0e8eb95a65a1e10 (diff)
downloadtinyproxy-ff72f5426e216ac9a897462f010abdf7a2f0ab90.tar.gz
tinyproxy-ff72f5426e216ac9a897462f010abdf7a2f0ab90.zip
Free entry_buffer or it'll be leaked
vector_append() calls vector_insert() which makes a copy of the passed buffer, so the caller can free its buffer.
Diffstat (limited to '')
-rw-r--r--src/log.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/log.c b/src/log.c
index 00bb43f..01b4256 100644
--- a/src/log.c
+++ b/src/log.c
@@ -150,6 +150,8 @@ log_message(int level, char *fmt, ...)
sprintf(entry_buffer, "%d %s", level, str);
vector_append(log_message_storage, entry_buffer,
strlen(entry_buffer) + 1);
+
+ safefree(entry_buffer);
goto out;
}
#ifdef HAVE_SYSLOG_H