From: Arnaud Giersch Date: Tue, 12 Feb 2019 22:27:28 +0000 (+0100) Subject: Plug memory leaks for tests 1 to 5. X-Git-Tag: v3_22~344 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/77adcd12725409223e3914964688454e4519fa6b?ds=sidebyside;hp=6d76121aad365cdeda0c0575afb192b642775197 Plug memory leaks for tests 1 to 5. --- diff --git a/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp b/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp index 3f500b0f4a..fe7a2f23ec 100644 --- a/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp +++ b/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp @@ -170,6 +170,7 @@ static int test_launcher(int /*argc*/, char** /*argv*/) test = 6; if (xbt_dynar_search_or_negative(tests, &test) != -1) { XBT_INFO("Test 6: Turn on Jupiter, assign a VM on Jupiter, launch a process inside the VM, and turn off the node"); + MSG_process_set_data_cleanup(nullptr); // If set for test 6, cleanup handler gives double-free errors. // Create VM0 msg_vm_t vm0 = MSG_vm_create_core(jupiter, "vm0"); @@ -224,6 +225,7 @@ int main(int argc, char* argv[]) MSG_create_environment(argv[1]); + MSG_process_set_data_cleanup(task_cleanup_handler); MSG_process_create("test_launcher", test_launcher, NULL, MSG_get_host_by_name("Tremblay")); res = MSG_main();