diff options
Diffstat (limited to 'libc/list.c')
-rw-r--r-- | libc/list.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/list.c b/libc/list.c index cf51e33..c86b23d 100644 --- a/libc/list.c +++ b/libc/list.c @@ -15,6 +15,8 @@ struct list *list_new(void) void list_destroy(struct list *list) { + if (!list) + return; struct node *iterator = list->head; while (iterator != NULL) { if (iterator->next == NULL) { |