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 */ } }