diff options
-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; } |