diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2018-03-12 19:33:19 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2018-03-12 19:33:19 (GMT) |
commit | 6492e67cdc521e555ba4152bf9d8a2ecfa909947 (patch) | |
tree | 42da572a88bd56001196d7dd288cb757575a83ee /testpar | |
parent | 1918972960d003a624bae6896613cb3493bc8e55 (diff) | |
parent | 5d7c18fcfc14a53f4d6321460463357fbda61f4b (diff) | |
download | hdf5-6492e67cdc521e555ba4152bf9d8a2ecfa909947.zip hdf5-6492e67cdc521e555ba4152bf9d8a2ecfa909947.tar.gz hdf5-6492e67cdc521e555ba4152bf9d8a2ecfa909947.tar.bz2 |
Merge pull request #939 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:HDFFV-10397-testphdf5-has-some-memory-leaks to develop
* commit '5d7c18fcfc14a53f4d6321460463357fbda61f4b':
Remove comparison to NULL for variables to be freed.
Add HDfree of vector, matrix_out and matrix_out1 previously HDmalloced in coll_write_test().
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_span_tree.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index 20bc4ac..3c836ad 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -255,7 +255,7 @@ void coll_write_test(int chunk_factor) #endif - int *matrix_out, *matrix_out1, *vector; + int *matrix_out = NULL, *matrix_out1 = NULL, *vector = NULL; int mpi_size,mpi_rank; @@ -662,6 +662,13 @@ void coll_write_test(int chunk_factor) ret = H5Fclose(file); VRFY((ret >= 0),""); + if (vector) + HDfree(vector); + if (matrix_out) + HDfree(matrix_out); + if (matrix_out1) + HDfree(matrix_out1); + return ; } |