Skip to content

Commit

Permalink
Also fix memory leak in surface
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWessel committed Nov 18, 2023
1 parent 3aa9db8 commit 953e9a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,7 @@ GMT_LOCAL int surface_read_data (struct GMT_CTRL *GMT, struct SURFACE_INFO *C, s

if (C->npoints == 0) {
GMT_Report (GMT->parent, GMT_MSG_ERROR, "No datapoints inside region, aborting\n");
gmt_M_free (GMT, C->data);
return (GMT_RUNTIME_ERROR);
}

Expand Down

0 comments on commit 953e9a8

Please sign in to comment.