Fix Some Memory Leaks

Fixing some memory leaks :)
master
Axel Huebl 2019-08-02 19:23:05 -05:00
parent 4b2cd69ef7
commit bfff0df8fd
No known key found for this signature in database
GPG Key ID: 472D2C364E21D94B
3 changed files with 9 additions and 0 deletions

View File

@ -89,6 +89,7 @@ option_help * POSIX_options(void ** init_backend_options, void * init_values){
} }
*init_backend_options = o; *init_backend_options = o;
free(o);
option_help h [] = { option_help h [] = {
{0, "posix.odirect", "Direct I/O Mode", OPTION_FLAG, 'd', & o->direct_io}, {0, "posix.odirect", "Direct I/O Mode", OPTION_FLAG, 'd', & o->direct_io},

View File

@ -1901,6 +1901,9 @@ mdtest_results_t * mdtest_run(int argc, char **argv, MPI_Comm world_com, FILE *
options_all_t * global_options = airoi_create_all_module_options(options); options_all_t * global_options = airoi_create_all_module_options(options);
option_parse(argc, argv, global_options); option_parse(argc, argv, global_options);
updateParsedOptions(& param, global_options); updateParsedOptions(& param, global_options);
free(global_options->modules);
free(global_options);
backend = param.backend; backend = param.backend;
MPI_Comm_rank(testComm, &rank); MPI_Comm_rank(testComm, &rank);

View File

@ -16,6 +16,11 @@ int main(int argc, char ** argv){
fprintf(stderr, "Could not run ior\n"); fprintf(stderr, "Could not run ior\n");
ret = 1; ret = 1;
} }
else
{
free(res->params.platform);
free(res);
}
} }
if (rank == 0){ if (rank == 0){
char * param[] = {"./mdtest", "-a", "DUMMY"}; char * param[] = {"./mdtest", "-a", "DUMMY"};