From e9561a9bd14469edab70886d98e050bfe054a3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Fri, 13 Sep 2019 18:29:15 +0800 Subject: Free each ticket --- test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test.c b/test.c index 300a8be..f7fca73 100644 --- a/test.c +++ b/test.c @@ -53,6 +53,8 @@ int main(void) for (unsigned short i = 0; i < list->length; i++) { char *ticket = list->tickets[i]; printf("Ticket %d: %s\n", i, ticket); + if (ticket) + free(ticket); } free(list); } -- cgit v1.2.3