From 7a100ac971186e5104595b960eb96b65ce45aa46 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 18 Dec 2017 11:45:34 +0100 Subject: [PATCH] fix(c-core): avoid memory leak on chat room destruction --- coreapi/linphonecore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 294fa3132..8fcbef6ac 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -6003,6 +6003,8 @@ void _linphone_core_uninit(LinphoneCore *lc) ms_usleep(10000); } + lc->chat_rooms = bctbx_list_free_with_data(lc->chat_rooms, (bctbx_list_free_func)linphone_chat_room_unref); + linphone_core_set_state(lc,LinphoneGlobalShutdown,"Shutting down"); #ifdef VIDEO_ENABLED if (lc->previewstream!=NULL){