Skip to content

Commit

Permalink
r.stats: Fix Resource Leak Issue (#4817)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamDesai authored Dec 9, 2024
1 parent 4402747 commit 9e4decb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions raster/r.stats/cell_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ int cell_stats(int fd[], int with_percents, int with_counts, int with_areas,
sort_cell_stats(do_sort);
print_cell_stats(fmt, with_percents, with_counts, with_areas, with_labels,
fs);
for (i = 0; i < nfiles; i++) {
G_free(cell[i]);
}
G_free(cell);

return 0;
}

0 comments on commit 9e4decb

Please sign in to comment.