With very short delay one can see irqfile file descriptors pile up rather
quickly causing program to stop with too many open files error. This commit
fixes that, and removes couple other memory leaks. With these the command
should hopefully run fine for days if not even months.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sizeof(*stat->irq_info) * stat->nr_irq_info);
}
}
-
+ fclose(irqfile);
+ free(buffer);
return stat;
close_file:
if (is_tty)
tcsetattr(STDIN_FILENO, TCSAFLUSH, &saved_tty);
- if (!ctl.run_once)
+ if (ctl.win) {
+ delwin(ctl.win);
endwin();
-
+ }
return retval;
}