From 837f72b39e7c1b40120ce6b5f51c93fe33ccd771 Mon Sep 17 00:00:00 2001 From: xor2003 Date: Fri, 24 Oct 2014 15:53:38 +0400 Subject: [PATCH] Fix for memory leak. And add forgotten break --- toxav/toxav.c | 2 ++ toxcore/group.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/toxav/toxav.c b/toxav/toxav.c index 7cba031e..8549bc05 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c @@ -588,6 +588,8 @@ int toxav_kill_transmission ( ToxAv *av, int32_t call_index ) codec_terminate_session(call->cs); call->cs = NULL; + free(call->frame_buf); + pthread_mutex_unlock(&call->mutex); pthread_mutex_destroy(&call->mutex); diff --git a/toxcore/group.c b/toxcore/group.c index 26df82bd..3a3a0561 100644 --- a/toxcore/group.c +++ b/toxcore/group.c @@ -1282,6 +1282,8 @@ static void handle_direct_packet(Group_Chats *g_c, int groupnumber, const uint8_ } } + break; + case PEER_QUERY_ID: { Group_c *g = get_group_c(g_c, groupnumber);