From ee70057f763ffb2149dd63e1dd449de69ed145b5 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Sun, 24 Aug 2008 11:59:24 +0530 Subject: [PATCH] Fix leak of entry_buffer --- src/log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index d6c2771..b53ee30 100644 --- a/src/log.c +++ b/src/log.c @@ -146,11 +146,12 @@ log_message(int level, char *fmt, ...) entry_buffer = safemalloc(strlen(str) + 6); if (!entry_buffer) return; - + sprintf(entry_buffer, "%d %s", level, str); vector_append(log_message_storage, entry_buffer, strlen(entry_buffer) + 1); + safefree(entry_buffer); va_end(args); return;