From: Gabriel Corona Date: Thu, 7 May 2015 08:53:28 +0000 (+0200) Subject: [mc] Fix MC_free_object X-Git-Tag: v3_12~732^2~6 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f8e935ef7c71f65320ad4c7668d1dc5010197fd5 [mc] Fix MC_free_object xbt_free() does not take a pointer to the pointer but the pointer. This behaviour is different from xbt_dict_free, xbt_dynar_free... --- diff --git a/src/mc/mc_dwarf.cpp b/src/mc/mc_dwarf.cpp index ea37410631..4af3c2552a 100644 --- a/src/mc/mc_dwarf.cpp +++ b/src/mc/mc_dwarf.cpp @@ -1114,12 +1114,12 @@ mc_object_info_t MC_new_object_info(void) void MC_free_object_info(mc_object_info_t * info) { - xbt_free(&(*info)->file_name); + xbt_free((*info)->file_name); xbt_dict_free(&(*info)->subprograms); xbt_dynar_free(&(*info)->global_variables); xbt_dict_free(&(*info)->types); xbt_dict_free(&(*info)->full_types_by_name); - xbt_free(info); + xbt_free(*info); xbt_dynar_free(&(*info)->functions_index); *info = NULL; } diff --git a/src/mc/mc_snapshot.cpp b/src/mc/mc_snapshot.cpp index b752c9ce45..7c587f9e6d 100644 --- a/src/mc/mc_snapshot.cpp +++ b/src/mc/mc_snapshot.cpp @@ -193,17 +193,15 @@ static inline void init_memory(void* mem, size_t size) static void test_snapshot(bool sparse_checkpoint); -XBT_TEST_UNIT("page_snapshots", test_per_snpashots, "Test per-page snapshots") -{ - test_snapshot(1); -} - - XBT_TEST_UNIT("flat_snapshot", test_flat_snapshots, "Test flat snapshots") { test_snapshot(0); } +XBT_TEST_UNIT("page_snapshots", test_per_snpashots, "Test per-page snapshots") +{ + test_snapshot(1); +} static void test_snapshot(bool sparse_checkpoint) {