diff options
author | Mukund Sivaraman <muks@banu.com> | 2008-03-30 17:51:51 -0700 |
---|---|---|
committer | Mukund Sivaraman <muks@banu.com> | 2008-03-30 17:51:51 -0700 |
commit | ff72f5426e216ac9a897462f010abdf7a2f0ab90 (patch) | |
tree | a096e674cb26b9333aff9e90f4ed0f274f5dd34b | |
parent | 12501d599cafa3774bec6ed6d0e8eb95a65a1e10 (diff) | |
download | tinyproxy-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.
-rw-r--r-- | src/log.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |