Skip to content

Commit

Permalink
v.net.timetable: Fix Resource Leak issue in main.c (#4508)
Browse files Browse the repository at this point in the history
* Fix Resource Leak issue

* requested changes
  • Loading branch information
ShubhamDesai authored Oct 14, 2024
1 parent 3a9059b commit a98691f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vector/v.net.timetable/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ void write_subroute(struct segment *seg, struct line_pnts *line, int line_id)
struct line_cats *Cats;
struct ilist *list;

Points = Vect_new_line_struct();
Cats = Vect_new_cats_struct();
list = Vect_new_list();
r = seg->route;

Vect_cat_set(Cats, 2, line_id);
Expand All @@ -188,6 +186,9 @@ void write_subroute(struct segment *seg, struct line_pnts *line, int line_id)
return;
}

Points = Vect_new_line_struct();
list = Vect_new_list();

for (i = 0; i < nnodes; i++)
edges[i] = 0;
for (i = 0; i < lines[r]->n_values; i++)
Expand Down

0 comments on commit a98691f

Please sign in to comment.