8269064: Dropped messages of AsyncLogWriter cause memleak

Reviewed-by: dholmes, simonis
This commit is contained in:
Xin Liu 2021-06-23 08:45:49 +00:00 committed by Volker Simonis
parent ce917b2359
commit 1323be54d2

View file

@ -46,6 +46,7 @@ void AsyncLogWriter::enqueue_locked(const AsyncLogMessage& msg) {
uint32_t* counter = _stats.add_if_absent(msg.output(), 0, &p_created);
*counter = *counter + 1;
// drop the enqueueing message.
os::free(msg.message());
return;
}