From 68af5bdecd4837050eb38ee53760e0fc498597be Mon Sep 17 00:00:00 2001 From: Radovan Kofira Date: Tue, 10 Nov 2020 20:18:51 +0100 Subject: [PATCH] acb --- cv6/a_station.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cv6/a_station.c b/cv6/a_station.c index 5f7e03d..0edd3d5 100644 --- a/cv6/a_station.c +++ b/cv6/a_station.c @@ -24,6 +24,18 @@ struct station* create_station(){ }*/ void destroy_station(struct station* station){ + for(int i=0;i>station->track_count;i++){ + struct car* prev = station->tracks[i]; + while (prev!=NULL) + { + free(del); + } + + } + + free(station->tracks); + free(station); +} } int select_track(struct station* station, const char* target){