From 2f98e5b91ac78104b111f0ba228305b564b53fd2 Mon Sep 17 00:00:00 2001 From: Shubham Vasudeo Desai Date: Wed, 25 Sep 2024 17:11:09 -0400 Subject: [PATCH] fix resource Leak --- vector/v.vol.rst/user1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vector/v.vol.rst/user1.c b/vector/v.vol.rst/user1.c index a5d456a3ea1..6a1c2f441e6 100644 --- a/vector/v.vol.rst/user1.c +++ b/vector/v.vol.rst/user1.c @@ -220,6 +220,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql) if (a < 0) { G_warning(_("Can't insert %lf,%lf,%lf,%lf,%lf a=%d"), x, y, z, w, sm, a); + Vect_destroy_field_info(Fi); return -1; } @@ -322,6 +323,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql) } else { fprintf(stderr, "ERROR: zero points in the given region!\n"); + Vect_destroy_field_info(Fi); return -1; } } @@ -332,6 +334,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql) KMIN, KMAX); fprintf(stderr, "for smooth connection of segments, npmin > segmax " "(see manual) \n"); + Vect_destroy_field_info(Fi); return -1; }