Commit 0dfe68b2 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fix issue in chatdb unlink in tester + use delete instead of free

parent fc109e21
......@@ -65,7 +65,7 @@ bctbx_list_t* linphone_vcard_list_from_vcard4_file(const char *filename) {
result = bctbx_list_append(result, vCard);
}
}
free(parser);
delete(parser);
}
return result;
}
......@@ -82,7 +82,7 @@ bctbx_list_t* linphone_vcard_list_from_vcard4_buffer(const char *buffer) {
result = bctbx_list_append(result, vCard);
}
}
free(parser);
delete(parser);
}
return result;
}
......@@ -97,7 +97,7 @@ LinphoneVcard* linphone_vcard_new_from_vcard4_buffer(const char *buffer) {
} else {
ms_error("Couldn't parse buffer %s", buffer);
}
free(parser);
delete(parser);
}
return vCard;
}
......
......@@ -420,7 +420,7 @@ void linphone_core_manager_uninit(LinphoneCoreManager *mgr) {
if (mgr->stat.last_received_info_message) linphone_info_message_destroy(mgr->stat.last_received_info_message);
if (mgr->lc){
const char *record_file=linphone_core_get_record_file(mgr->lc);
const char *chatdb = linphone_core_get_chat_database_path(mgr->lc);
char *chatdb = ms_strdup(linphone_core_get_chat_database_path(mgr->lc));
if (!liblinphone_tester_keep_record_files && record_file){
if ((bc_get_number_of_failures()-mgr->number_of_cunit_error_at_creation)>0) {
ms_message ("Test has failed, keeping recorded file [%s]",record_file);
......@@ -429,7 +429,10 @@ void linphone_core_manager_uninit(LinphoneCoreManager *mgr) {
}
}
linphone_core_destroy(mgr->lc);
if (chatdb) unlink(chatdb);
if (chatdb) {
unlink(chatdb);
ms_free(chatdb);
}
}
if (mgr->identity) {
linphone_address_destroy(mgr->identity);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment