mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-18 08:19:59 +00:00
fix for small memory leaks
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@562 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
50e327024e
commit
f198d550bc
4 changed files with 13 additions and 4 deletions
|
@ -102,7 +102,11 @@ void* AllocateMemoryPages(int size)
|
|||
void FreeMemoryPages(void* ptr, int size)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
VirtualFree(ptr, 0, MEM_RELEASE);
|
||||
if (ptr)
|
||||
{
|
||||
VirtualFree(ptr, 0, MEM_RELEASE);
|
||||
ptr = NULL;
|
||||
}
|
||||
#else
|
||||
munmap(ptr, size);
|
||||
#endif
|
||||
|
|
|
@ -65,6 +65,8 @@ void CFileSearch::FindFiles(const std::string& _searchString, const std::string&
|
|||
bkeepLooping = FindNextFile(FindFirst, &findData) ? true : false;
|
||||
}
|
||||
}
|
||||
FindClose(FindFirst);
|
||||
|
||||
|
||||
#else
|
||||
size_t dot_pos = _searchString.rfind(".");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue