From 386b1cebca87fd1fe89e23d5d2d2547027f365fb Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 26 Oct 2020 19:17:31 +0100 Subject: [PATCH] train --- cv5/a_train.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cv5/a_train.c b/cv5/a_train.c index 6acbafc..7cecd41 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -40,6 +40,7 @@ void cancel_train(struct car* first) { else if(first->next == NULL){ free(first); first = NULL; + exit(0); } cancel_train(first->next); free(first);