diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2019-08-18 15:08:02 +0100 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2019-08-18 15:08:02 +0100 |
commit | aec3c01db0b080ccea416eb2564cfedd2e582a5b (patch) | |
tree | b48fdda11d007af42c80dbd96bf52f652bc84ab9 /src/list.c | |
parent | 00ad6b1d8e946069963bc2ab09f4f01c8e81ab03 (diff) | |
download | imv-aec3c01db0b080ccea416eb2564cfedd2e582a5b.tar.gz |
imv: Add -c option to specify commands to run at startup
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -13,8 +13,10 @@ struct list *list_create(void) void list_free(struct list *list) { - free(list->items); - free(list); + if (list) { + free(list->items); + free(list); + } } void list_deep_free(struct list *list) |