diff options
author | bunnei <bunneidev@gmail.com> | 2021-11-02 04:11:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 04:11:30 +0100 |
commit | b118fa8698dbe0e2b6e663c1c37a7eac03422905 (patch) | |
tree | 14864116c00d385abba61ad2330c1c0f50e4b961 /src/core/hle/kernel/k_process.cpp | |
parent | Merge pull request #7264 from zhaobot/tx-update-20211101021628 (diff) | |
parent | Fix dangling kernel objects when exiting (diff) | |
download | yuzu-b118fa8698dbe0e2b6e663c1c37a7eac03422905.tar yuzu-b118fa8698dbe0e2b6e663c1c37a7eac03422905.tar.gz yuzu-b118fa8698dbe0e2b6e663c1c37a7eac03422905.tar.bz2 yuzu-b118fa8698dbe0e2b6e663c1c37a7eac03422905.tar.lz yuzu-b118fa8698dbe0e2b6e663c1c37a7eac03422905.tar.xz yuzu-b118fa8698dbe0e2b6e663c1c37a7eac03422905.tar.zst yuzu-b118fa8698dbe0e2b6e663c1c37a7eac03422905.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_process.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index 211157ccc..76fd8c285 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -434,11 +434,6 @@ void KProcess::PrepareForTermination() { } void KProcess::Finalize() { - // Release memory to the resource limit. - if (resource_limit != nullptr) { - resource_limit->Close(); - } - // Finalize the handle table and close any open handles. handle_table.Finalize(); @@ -460,6 +455,12 @@ void KProcess::Finalize() { } } + // Release memory to the resource limit. + if (resource_limit != nullptr) { + resource_limit->Close(); + resource_limit = nullptr; + } + // Perform inherited finalization. KAutoObjectWithSlabHeapAndContainer<KProcess, KSynchronizationObject>::Finalize(); } |