diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-19 10:06:28 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-19 10:06:28 (EDT) |
commit | 0e3b97a9d7b6ae77b98efee57cf9119d684f2be9 (patch) | |
tree | eddde87c57a921e17a8902b91e8fc280cc9f9b58 /src | |
parent | d79a99b0910f0cea5ec4c8332fa162c46bae2492 (diff) |
main: Fix list free loop
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -73,10 +73,10 @@ main(int argc, char *argv[]) error1: opkg_opk_opk_free_outer(opk); error0: - for (control_files_tail = control_files_head; - control_files_tail != NULL; ) { - control_files_tail = control_files_head->next; - free(control_files_head); + while (control_files_head != NULL) { + control_files_tail = control_files_head; + control_files_head = control_files_head->next; + free(control_files_tail); } return EXIT_FAILURE; } |