mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 01:39:20 +00:00
Fix issue in chatdb unlink in tester + use delete instead of free
This commit is contained in:
parent
fc109e215c
commit
0dfe68b2c5
2 changed files with 8 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue