diff --git a/toxav/rtp.c b/toxav/rtp.c index d5f7ac7f..212dd774 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c @@ -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); }