Skip to content

Commit

Permalink
r.resamp.stats: Fix Resource Leak issue in main.c (#5029)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamDesai authored Feb 3, 2025
1 parent c3f43c3 commit 9ad5047
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions raster/r.resamp.stats/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ static void resamp_unweighted(void)

Rast_put_d_row(outfile, outbuf);
}
G_free(row_map);
G_free(col_map);
G_free(values);
}

static void resamp_weighted(void)
Expand Down Expand Up @@ -233,6 +236,9 @@ static void resamp_weighted(void)

Rast_put_d_row(outfile, outbuf);
}
G_free(row_map);
G_free(col_map);
G_free(values);
}

int main(int argc, char *argv[])
Expand Down

0 comments on commit 9ad5047

Please sign in to comment.