Skip to content

Commit

Permalink
lib/vector/Vlib: Fix Resource Leak issue in open_nat.c (#5080)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamDesai authored Feb 10, 2025
1 parent 1c93c80 commit 4e3e14c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/vector/Vlib/open_nat.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ int V1_open_old_nat(struct Map_info *Map, int update)
Map->dig_fp.file = G_fopen_old(path, GV_COOR_ELEMENT, Map->mapset);

if (Map->dig_fp.file == NULL) {
G_warning(_("Unable to open coor file for vector map <%s>"),
Vect_get_full_name(Map));
const char *map_name = Vect_get_full_name(Map);
G_warning(_("Unable to open coor file for vector map <%s>"), map_name);
G_free((void *)map_name);
return -1;
}

Expand Down

0 comments on commit 4e3e14c

Please sign in to comment.