Fix leak of entry_buffer

This commit is contained in:
Mukund Sivaraman 2008-08-24 11:59:24 +05:30
parent a7f379fafc
commit ee70057f76

View File

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