Fix quiting with marked files
This commit is contained in:
parent
c50af43b7b
commit
6f9c5ac5ed
2 changed files with 2 additions and 5 deletions
5
ccc.c
5
ccc.c
|
@ -459,9 +459,8 @@ void cleanup(void)
|
||||||
if (files->length != 0) {
|
if (files->length != 0) {
|
||||||
arraylist_free(files);
|
arraylist_free(files);
|
||||||
}
|
}
|
||||||
if (marked->length != 0) {
|
free(marked->items);
|
||||||
arraylist_free(marked);
|
free(marked);
|
||||||
}
|
|
||||||
/* Restore old terminal settings */
|
/* Restore old terminal settings */
|
||||||
tcsetattr(STDIN_FILENO, TCSAFLUSH, &oldt);
|
tcsetattr(STDIN_FILENO, TCSAFLUSH, &oldt);
|
||||||
bprintf("\033[2J\033[?1049l\033[?25h");
|
bprintf("\033[2J\033[?1049l\033[?25h");
|
||||||
|
|
2
file.c
2
file.c
|
@ -16,7 +16,6 @@ ArrayList *arraylist_init(size_t capacity)
|
||||||
|
|
||||||
void arraylist_free(ArrayList *list)
|
void arraylist_free(ArrayList *list)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
for (size_t i = 0; i < list->length; i++) {
|
for (size_t i = 0; i < list->length; i++) {
|
||||||
if (list->items[i].name != NULL)
|
if (list->items[i].name != NULL)
|
||||||
free(list->items[i].name);
|
free(list->items[i].name);
|
||||||
|
@ -25,7 +24,6 @@ void arraylist_free(ArrayList *list)
|
||||||
if (list->items[i].stats != NULL)
|
if (list->items[i].stats != NULL)
|
||||||
free(list->items[i].stats);
|
free(list->items[i].stats);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
free(list->items);
|
free(list->items);
|
||||||
free(list);
|
free(list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue