Fix memory leak when closing Title Sequence handle.

The handle is now invalid after calling TitleSequenceCloseParkHandle().
This commit is contained in:
ceeac 2017-05-26 10:24:22 +02:00
parent f58d711981
commit eeac581857
2 changed files with 6 additions and 0 deletions

View File

@ -166,6 +166,7 @@ extern "C"
{
Memory::Free(handle->HintPath);
delete ((IStream *)handle->Stream);
Memory::Free(handle);
}
}

View File

@ -88,6 +88,11 @@ extern "C"
void FreeTitleSequence(TitleSequence * seq);
TitleSequenceParkHandle * TitleSequenceGetParkHandle(TitleSequence * seq, size_t index);
/**
* Close a title sequence park handle.
* The pointer to the handle is invalid after calling this function.
*/
void TitleSequenceCloseParkHandle(TitleSequenceParkHandle * handle);
bool TileSequenceSave(TitleSequence * seq);
bool TileSequenceAddPark(TitleSequence * seq, const utf8 * path, const utf8 * name);