Skip to content

Commit

Permalink
fixed remap memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Mar 24, 2019
1 parent e55de31 commit f70ce39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/clib/pioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,8 @@ int PIOc_InitDecomp(int iosysid, int pio_type, int ndims, const int *gdimlen, in
break;
}
}
if (iodesc->needssort){
if (iodesc->needssort)
{
struct sort_map *tmpsort;

if (!(tmpsort = malloc(sizeof(struct sort_map) * maplen)))
Expand Down
3 changes: 3 additions & 0 deletions src/clib/pioc_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,9 @@ int PIOc_freedecomp(int iosysid, int ioid)
/* Free the dimlens. */
free(iodesc->dimlen);

if (iodesc->remap)
free(iodesc->remap);

LOG((3, "freeing rfrom, rtype"));
if (iodesc->rfrom)
free(iodesc->rfrom);
Expand Down

0 comments on commit f70ce39

Please sign in to comment.