Open JaihsonK opened 1 year ago
Thanks for that much appreciated, I know youve made a couple issue reports don't worry I am not ignoring you, I am waiting because I plan to make a part 2 to the course, so just before I start I plan to make one big lecture fixing all of the problems
OK no problem!
Cheers, Jaihson
Hey Dan!
I found a memory leak in the fopen() function. In case of an error, we do not free root_path or descriptor_private_data. this would create a memory leak, especially if the error occurs on line 175 (PeachOS-master). My proposed solution is as follows:
out:
// fopen shouldnt return negative values
if (res < 0)
{
if(root_path)
pathparser_free(root_path);
if(descriptor_private_data)
kfree(descriptor_private_data);
res = 0;
}
return res;