Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.vol.rst: Fix Resource Leak issue in user1.c file #4389

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 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 Expand Up @@ -382,6 +385,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
}
G_message(_("Bitmap mask created"));
}
Vect_destroy_field_info(Fi);

return 1;
}
Expand Down
Loading