diff --git a/src/xenia/kernel/xobject.cc b/src/xenia/kernel/xobject.cc index e65d979e4..077a3e112 100644 --- a/src/xenia/kernel/xobject.cc +++ b/src/xenia/kernel/xobject.cc @@ -39,6 +39,13 @@ XObject::~XObject() { if (allocated_guest_object_) { uint32_t ptr = guest_object_ptr_ - sizeof(X_OBJECT_HEADER); + auto header = memory()->TranslateVirtual(ptr); + + // Free the object creation info + if (header->object_create_info) { + memory()->SystemHeapFree(header->object_create_info); + } + memory()->SystemHeapFree(ptr); } }