Commit 8b1d320f authored by Ghislain MARY's avatar Ghislain MARY

Fix crash in VCard testers on Windows.

parent e25f326f
......@@ -1221,7 +1221,7 @@ void linphone_core_friends_storage_init(LinphoneCore *lc) {
linphone_create_table(db);
if (linphone_update_table(db)) {
// After updating schema, database need to be closed/reopenned
sqlite3_close(lc->friends_db);
sqlite3_close(db);
_linphone_sqlite3_open(lc->friends_db_file, &db);
}
......
......@@ -243,9 +243,9 @@ static void friends_migration(void) {
BC_ASSERT_EQUAL(lp_config_get_int(lpc, "misc", "friends_migration_done", 0), 1, int, "%i");
friends_from_db = bctbx_list_free_with_data(friends_from_db, (void (*)(void *))linphone_friend_unref);
linphone_core_manager_destroy(manager);
unlink(friends_db);
bc_free(friends_db);
linphone_core_manager_destroy(manager);
}
typedef struct _LinphoneFriendListStats {
......@@ -368,11 +368,11 @@ static void friends_sqlite_storage(void) {
end:
ms_free(stats);
unlink(friends_db);
bc_free(friends_db);
linphone_address_unref(addr);
linphone_core_destroy(lc);
linphone_core_v_table_destroy(v_table);
unlink(friends_db);
bc_free(friends_db);
}
#endif
......@@ -472,10 +472,10 @@ static void carddav_sync_2(void) {
BC_ASSERT_EQUAL(stats->sync_done_count, 1, int, "%i");
ms_free(stats);
unlink(friends_db);
bc_free(friends_db);
linphone_carddav_context_destroy(c);
linphone_core_manager_destroy(manager);
unlink(friends_db);
bc_free(friends_db);
}
static void carddav_sync_3(void) {
......@@ -512,11 +512,10 @@ static void carddav_sync_3(void) {
BC_ASSERT_EQUAL(stats->sync_done_count, 1, int, "%i");
ms_free(stats);
unlink(friends_db);
bc_free(friends_db);
linphone_carddav_context_destroy(c);
c = NULL;
linphone_core_manager_destroy(manager);
unlink(friends_db);
bc_free(friends_db);
}
static void carddav_sync_4(void) {
......
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