aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/kernel/k_process.cpp
diff options
context:
space:
mode:
authorLiam <[email protected]>2024-01-07 13:59:48 -0500
committerLiam <[email protected]>2024-01-12 18:31:33 -0500
commitf2fed21c1139c8d5c030bc5caee5c612dfe7979f (patch)
tree4051a2e4e1c34370fa259ecf36783b76ea66a56f /src/core/hle/kernel/k_process.cpp
parentf7a3c135e2f17cc00d1f006146afc73a21408e3a (diff)
downloadyuzu-mainline-f2fed21c1139c8d5c030bc5caee5c612dfe7979f.tar.gz
yuzu-mainline-f2fed21c1139c8d5c030bc5caee5c612dfe7979f.zip
kernel: fix page leak on process termination
Diffstat (limited to 'src/core/hle/kernel/k_process.cpp')
-rw-r--r--src/core/hle/kernel/k_process.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp
index 068e71dff..ae332a550 100644
--- a/src/core/hle/kernel/k_process.cpp
+++ b/src/core/hle/kernel/k_process.cpp
@@ -171,6 +171,12 @@ void KProcess::Finalize() {
m_resource_limit->Close();
}
+ // Clear expensive resources, as the destructor is not called for guest objects.
+ for (auto& interface : m_arm_interfaces) {
+ interface.reset();
+ }
+ m_exclusive_monitor.reset();
+
// Perform inherited finalization.
KSynchronizationObject::Finalize();
}