diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-10-18 09:08:17 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-10-18 09:08:17 (GMT) |
commit | 58c8c10efc5f5f56dd32867e8563ce2fe4b3e17d (patch) | |
tree | 3bb01cb01b7bb3f49e3bf7e671c5b7a3f94e6f00 | |
parent | fed9512843fb8827a511fe1248d554e862b5f770 (diff) |
Fix potential memory leak. Remove unused assignment.
-rw-r--r-- | src/lib/tng_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index 25460ca..7e78a85 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -4151,6 +4151,7 @@ static tng_function_status tng_gzip_compress(tng_trajectory_t tng_data, if(!temp) { free(block->block_contents); + free(dest); block->block_contents = 0; printf("Cannot allocate memory (%"PRId64" bytes). %s: %d\n", block->block_contents_size, __FILE__, __LINE__); @@ -10955,7 +10956,6 @@ tng_function_status DECLSPECDLLEXPORT tng_data_block_add strncpy(first_dim_values[j], new_data_c, len); new_data_c += len; - new_data=new_data_c; } } } |