Skip to content

Commit

Permalink
free recently allocated vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Dec 8, 2017
1 parent fbc3584 commit 29ed162
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/clib/pio_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,8 @@ int inq_var_handler(iosystem_desc_t *ios)

if (ndims_present)
LOG((2, "inq_var_handler ndims = %d", ndims));
if (dimids_present)
free(dimidsp);

return PIO_NOERR;
}
Expand Down Expand Up @@ -1100,6 +1102,9 @@ int inq_var_chunking_handler(iosystem_desc_t *ios)
/* Call the inq function to get the values. */
PIOc_inq_var_chunking(ncid, varid, storagep, chunksizesp);

if(chunksizes_present)
free(chunksizesp);

return PIO_NOERR;
}

Expand Down Expand Up @@ -1528,6 +1533,9 @@ int def_var_chunking_handler(iosystem_desc_t *ios)
/* Call the function. */
PIOc_def_var_chunking(ncid, varid, storage, chunksizesp);

if(chunksizes_present)
free(chunksizesp);

LOG((1, "def_var_chunking_handler succeeded!"));
return PIO_NOERR;
}
Expand Down

0 comments on commit 29ed162

Please sign in to comment.