From ca5261d63f2b8b7a8b53f9282e4cc91862a7a68f Mon Sep 17 00:00:00 2001 From: ShubhamDesai <42180509+ShubhamDesai@users.noreply.github.com> Date: Fri, 29 Nov 2024 07:04:06 -0500 Subject: [PATCH] v.build.polylines: Fix Resource Leak issue in walk.c (#4734) * Resource Leak * Suggested changes --- vector/v.build.polylines/walk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/v.build.polylines/walk.c b/vector/v.build.polylines/walk.c index 9507c587319..2d168fb6662 100644 --- a/vector/v.build.polylines/walk.c +++ b/vector/v.build.polylines/walk.c @@ -166,6 +166,8 @@ int walk_forward_and_pick_up_coords(struct Map_info *map, int start_line, next_node = n2; /* continue at end node */ } else { + if (cats_tmp) + Vect_destroy_cats_struct(cats_tmp); return 1; /* no other line */ } }