diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-09-19 12:37:03 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-09-24 08:53:36 (GMT) |
commit | 851a86a9c673ace49928a67f9ae61dbf29296b35 (patch) | |
tree | fcb3aa788d2f4b005dd54670d30d5698376531ba | |
parent | 1ebe1012119655c15267979872b7fe84f823c0ee (diff) |
Only free memory once.
Since there is a problem with tng_particle_data_values_free it
is better to free the memory only once. It will not be
re-reserved anyhow.
Change-Id: Ibef28820bee10e39f00ea0d4f1ee27fafdea6d23
-rw-r--r-- | src/tests/tng_io_testing.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/tests/tng_io_testing.c b/src/tests/tng_io_testing.c index a9b7981..e154770 100644 --- a/src/tests/tng_io_testing.c +++ b/src/tests/tng_io_testing.c @@ -988,11 +988,6 @@ tng_function_status tng_test_get_positions_data(tng_trajectory_t traj, } } - tng_particle_data_values_free(traj, values, n_frames, n_particles, - n_values_per_frame, type); - - values = 0; - if(tng_particle_data_interval_get(traj, TNG_TRAJ_POSITIONS, 111000, 111499, hash_mode, &values, &n_particles, &n_values_per_frame, &type) == TNG_SUCCESS) @@ -1022,7 +1017,7 @@ tng_function_status tng_test_get_positions_data(tng_trajectory_t traj, { printf("Coordinates not in range. %s: %d\n", __FILE__, __LINE__); - tng_particle_data_values_free(traj, values, 50, n_particles, + tng_particle_data_values_free(traj, values, n_frames, n_particles, n_values_per_frame, type); return(TNG_FAILURE); } @@ -1031,7 +1026,7 @@ tng_function_status tng_test_get_positions_data(tng_trajectory_t traj, } } - tng_particle_data_values_free(traj, values, 50, n_particles, + tng_particle_data_values_free(traj, values, n_frames, n_particles, n_values_per_frame, type); return(TNG_SUCCESS); |