mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-09-14 14:26:27 -05:00
Fix a potential memory leak on non-windows systems.
Also added a FIXME to BPStructs.cpp and BPMemLoader.cpp
This commit is contained in:
@@ -512,12 +512,24 @@ bool DeleteDirRecursively(const std::string &directory)
|
||||
if (IsDirectory(newPath))
|
||||
{
|
||||
if (!DeleteDirRecursively(newPath))
|
||||
{
|
||||
#ifndef _WIN32
|
||||
closedir(dirp);
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!File::Delete(newPath))
|
||||
{
|
||||
#ifndef _WIN32
|
||||
closedir(dirp);
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
Reference in New Issue
Block a user