Skip to content

Commit

Permalink
fix leak during memory shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaspider committed Mar 26, 2023
1 parent 42411ca commit 4461ea8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libretro/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,10 @@ bool retro_load_game(const struct retro_game_info* game)
CommonHost::LoadStartupSettings();

if (!VMManager::Internal::InitializeGlobals() || !VMManager::Internal::InitializeMemory())
pxFailRel("Failed to allocate memory map");
{
log_cb(RETRO_LOG_ERROR, "Failed to allocate memory map");
return false;
}

VMManager::LoadSettings();

Expand Down
1 change: 1 addition & 0 deletions pcsx2/VirtualMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ void VirtualMemoryReserve::Release()
return;

m_allocator->Free(m_baseptr, m_size);
m_allocator.reset();
m_baseptr = nullptr;
m_size = 0;
}
Expand Down

0 comments on commit 4461ea8

Please sign in to comment.