Skip to content
Permalink
Browse files

Merge pull request #11875 from hrydgard/font-doublefree-callback-fix

sceFontLib: Don't call the callback if double-free.
  • Loading branch information...
hrydgard committed Mar 11, 2019
2 parents 335d257 + 7865589 commit 238211f50a20f56c395835685a372161e1367f9f
Showing with 3 additions and 1 deletion.
  1. +3 −1 Core/HLE/sceFont.cpp
@@ -436,7 +436,9 @@ class FontLib {
}
u32 args[2] = { params_.userDataAddr, (u32)handle_ };
// TODO: The return value of this is leaking.
__KernelDirectMipsCall(params_.freeFuncAddr, 0, args, 2, false);
if (handle_) { // Avoid calling free-callback on double-free
__KernelDirectMipsCall(params_.freeFuncAddr, 0, args, 2, false);
}
handle_ = 0;
fonts_.clear();
isfontopen_.clear();

0 comments on commit 238211f

Please sign in to comment.
You can’t perform that action at this time.