Skip to content

Commit

Permalink
Fix mem leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWessel committed Dec 16, 2023
1 parent eadbada commit 7c2ea0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/grdmix.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ static void *New_Ctrl (struct GMT_CTRL *GMT) { /* Allocate and initialize a new
static void Free_Ctrl (struct GMT_CTRL *GMT, struct GRDMIX_CTRL *C) { /* Deallocate control structure */
if (!C) return;
gmt_M_str_free (C->A.file);
gmt_M_str_free (C->C.file);
gmt_M_str_free (C->C.savecpt);
gmt_M_str_free (C->G.file);
gmt_M_str_free (C->I.file);
gmt_M_str_free (C->W.file);
Expand Down
1 change: 1 addition & 0 deletions src/grdview.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ static void Free_Ctrl (struct GMT_CTRL *GMT, struct GRDVIEW_CTRL *C) { /* Deallo
if (!C) return;
gmt_M_str_free (C->In.file);
gmt_M_str_free (C->C.file);
gmt_M_str_free (C->C.savecpt);
for (i = 0; i < 3; i++) gmt_M_str_free (C->G.file[i]);
gmt_M_str_free (C->I.file);
gmt_M_str_free (C->I.azimuth);
Expand Down

0 comments on commit 7c2ea0f

Please sign in to comment.