mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
fix: Eliminate memory leak in toxav.
This happens when shutting down a toxav session when it still has some packets in its internal queue. It's not a serious leak and happens very rarely (1 in 300 runs of the toxav_many_test), but it can happen and long-running tox instances that start and end calls a lot would eventually discover this.
This commit is contained in:
parent
caac17699e
commit
28623dcfa9
|
@ -710,6 +710,9 @@ void rtp_kill(RTPSession *session)
|
|||
LOGGER_DEBUG(session->m->log, "Terminated RTP session V3 work_buffer_list->next_free_entry: %d",
|
||||
(int)session->work_buffer_list->next_free_entry);
|
||||
|
||||
for (int8_t i = 0; i < session->work_buffer_list->next_free_entry; ++i) {
|
||||
free(session->work_buffer_list->work_buffer[i].buf);
|
||||
}
|
||||
free(session->work_buffer_list);
|
||||
free(session);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user