You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
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;
The text was updated successfully, but these errors were encountered: