From 58c8c10efc5f5f56dd32867e8563ce2fe4b3e17d Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Fri, 18 Oct 2013 11:08:17 +0200 Subject: Fix potential memory leak. Remove unused assignment. 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; } } } -- cgit v0.10.1