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.
This commit is contained in:
Mukund Sivaraman 2008-03-30 17:51:51 -07:00
parent 12501d599c
commit ff72f5426e

View File

@ -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