fix memory leak in case Message tests are passed in sequence

This commit is contained in:
Jehan Monnier 2014-12-02 15:17:26 +01:00
parent d0966f027f
commit 7ce476ffb0
2 changed files with 2 additions and 0 deletions

View file

@ -358,6 +358,7 @@ static void text_message_with_ack(void) {
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageReceived,1));
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneMessageDelivered,1));
CU_ASSERT_EQUAL(pauline->stat.number_of_LinphoneMessageInProgress,1);
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
}

View file

@ -103,6 +103,7 @@ static void auth_info_requested(LinphoneCore *lc, const char *realm, const char
void reset_counters( stats* counters) {
if (counters->last_received_chat_message) linphone_chat_message_unref(counters->last_received_chat_message);
memset(counters,0,sizeof(stats));
}