From 39910885d90b37484b6e8851fd04236fd5128c2a Mon Sep 17 00:00:00 2001 From: Eladash Date: Sun, 6 Aug 2023 21:04:48 +0300 Subject: [PATCH] PPU: fix leak when precompiling SELF files --- rpcs3/Emu/Cell/PPUThread.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index a052453071..b3f2da3006 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -3231,7 +3231,7 @@ extern void ppu_finalize(const ppu_module& info) fmt::append(cache_path, "ppu-%s-%s/", fmt::base57(info.sha1), info.path.substr(info.path.find_last_of('/') + 1)); #ifdef LLVM_AVAILABLE - g_fxo->get().remove(cache_path + info.name + "_" + std::to_string(std::bit_cast(info.segs[0].ptr))); + g_fxo->get().remove(cache_path + "_" + std::to_string(std::bit_cast(info.segs[0].ptr))); #endif } @@ -3588,9 +3588,8 @@ extern void ppu_precompile(std::vector& dir_queue, std::vector data) - jit_module& jit_mod = g_fxo->get().get(cache_path + info.name + "_" + std::to_string(std::bit_cast(info.segs[0].ptr))); + jit_module& jit_mod = g_fxo->get().get(cache_path + "_" + std::to_string(std::bit_cast(info.segs[0].ptr))); // Compiler instance (deferred initialization) std::shared_ptr& jit = jit_mod.pjit;