diff options
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 1446c98..cced772 100644 --- a/src/config.c +++ b/src/config.c @@ -130,3 +130,14 @@ struct node* config_load(char* path) { fclose(fd); return list; } + +void config_free(struct node* list) { + struct node* next = NULL; + + while(list != NULL) { + next = list->next; + free(list->data); + free(list); + list = next; + } +} |