summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-13 18:29:15 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-13 18:29:15 +0800
commite9561a9bd14469edab70886d98e050bfe054a3eb (patch)
tree3a9b44ecd63f79be3b7a51ada0baedc15dd4c3a4
parent2e207d07a6416d7ccb32040c3f9e43c3a48aeed2 (diff)
Free each ticket
-rw-r--r--test.c2
1 files changed, 2 insertions, 0 deletions
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);
}