Skip to content

Commit

Permalink
fix resource Leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Vasudeo Desai committed Sep 25, 2024
1 parent ab78adc commit 2f98e5b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vector/v.vol.rst/user1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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;
}

Expand Down

0 comments on commit 2f98e5b

Please sign in to comment.