Skip to content

Commit

Permalink
Plugged a memory leak in partition_point_cloud.
Browse files Browse the repository at this point in the history
  • Loading branch information
pbtoast committed May 3, 2018
1 parent 3bf6dce commit 36e6057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geometry/partition_point_cloud.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ bool partition_point_cloud(point_cloud_t** cloud,
distribute_point_cloud(cloud, comm, global_partition, fields, num_fields);

// Clean up.
if (rank == 0)
if (global_partition != NULL)
polymec_free(global_partition);

STOP_FUNCTION_TIMER();
Expand Down

0 comments on commit 36e6057

Please sign in to comment.