From ff72f5426e216ac9a897462f010abdf7a2f0ab90 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Sun, 30 Mar 2008 17:51:51 -0700 Subject: 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. --- src/log.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 -- cgit v1.2.3