From 9ad504764e3bc6696feb928d16d3f3b8bbc1ac0a Mon Sep 17 00:00:00 2001 From: ShubhamDesai <42180509+ShubhamDesai@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:58:33 -0500 Subject: [PATCH] r.resamp.stats: Fix Resource Leak issue in main.c (#5029) --- raster/r.resamp.stats/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/raster/r.resamp.stats/main.c b/raster/r.resamp.stats/main.c index efa2c67cbf3..f329eea856f 100644 --- a/raster/r.resamp.stats/main.c +++ b/raster/r.resamp.stats/main.c @@ -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) @@ -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[])