Skip to content

Commit

Permalink
Fix mem leak in test
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-stenstrom committed Oct 29, 2024
1 parent f1dacd9 commit 672a776
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Test/FMI3/fmi3_import_sim_me_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,10 @@ TEST_CASE("Test fallback/default value(s) passed to fmi3Instantiate") {
#endif
REQUIRE(strcmp(expected, loggedResourcePath) == 0);

fmi3_import_destroy_dllfmu(fmu);
// Clean up
REQUIRE(fmi3_import_terminate(fmu) == fmi3_status_ok);
fmi3_import_free_instance(fmu);
fmi3_import_free(fmu);
fmi_import_free_context(context);
REQUIRE(fmi_import_rmdir(&callbacks, tmpPath) == jm_status_success);
callbacks.free((void*)tmpPath);
Expand Down

0 comments on commit 672a776

Please sign in to comment.