PeachOS
PeachOS copied to clipboard
Memory leak process.c
process_load_for_slot kzallocs a new struct process, but never kfrees it. Possible solution:
process_unlink():
processes[process->id] = 0;
kfree(process);
if (current_process == process)
{
process_switch_to_any();
}
Thank you for this, once enough issues are identified I will be making another lecture where we fix them all