Skip to content

Commit

Permalink
fixed memory leaks in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Aug 5, 2020
1 parent 64a117c commit abef381
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tests/ncint/tst_ncint_async_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,11 @@ main(int argc, char **argv)
printf("%s,\t%d,\t%d,\t%d,\t%8.3f,\t%8.1f,\t%8.3f\n", mode_name[m],
ntasks, num_io_procs, 1, delta_in_sec, num_megabytes,
mb_per_sec);

free(my_data);
if (nc_free_decomp(ioid)) PERR;
} /* next mode flag */

free(my_data);
if (nc_free_decomp(ioid)) PERR;
if (nc_free_iosystem(iosysid)) PERR;
}
}
Expand Down
7 changes: 4 additions & 3 deletions tests/ncint/tst_ncint_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ main(int argc, char **argv)
printf("%s,\t%d,\t%d,\t%d,\t%8.3f,\t%8.1f,\t%8.3f\n", mode_name[m],
ntasks, num_io_procs, 1, delta_in_sec, num_megabytes,
mb_per_sec);
} /* next mode flag */

free(my_data);
if (nc_free_decomp(ioid)) PERR;

free(my_data);
if (nc_free_decomp(ioid)) PERR;
} /* next mode flag */
}
if (nc_free_iosystem(iosysid)) PERR;

Expand Down

0 comments on commit abef381

Please sign in to comment.