OpenRCT2/src/openrct2/rct12
John Kastner 6ea091841f
Fix memory leak loading malformed `SawyerChunk` (#21508)
* Fix memory leak loading malformed `SawyerChunk`

A temporary buffer was not free'd after failing to parse in
`SawyerChunkReader::ReadChunkTrack`. Fix this following the pattern used
in `SawyerChunkReader::ReadChunk` by wrapping the relevant code in a
`try` block with `FreeLargeTempBuffer` called when an exception is
caught.

* Use unique_ptr

* Remove `AllocateLargeTempBuffer`

---------

Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
2024-04-01 22:40:14 +00:00
..
EntryList.h Replace 2023 with 2024 in copyright headers (#21139) 2024-01-01 12:52:28 +01:00
Limits.h Replace 2023 with 2024 in copyright headers (#21139) 2024-01-01 12:52:28 +01:00
RCT12.cpp Part of #21421: replace define with constexpr (#21679) 2024-04-01 07:00:32 -03:00
RCT12.h Import maze entrances in the same way as regular ones 2024-01-11 22:49:40 +01:00
SawyerChunk.cpp Fix memory leak loading malformed `SawyerChunk` (#21508) 2024-04-01 22:40:14 +00:00
SawyerChunk.h Fix memory leak loading malformed `SawyerChunk` (#21508) 2024-04-01 22:40:14 +00:00
SawyerChunkReader.cpp Fix memory leak loading malformed `SawyerChunk` (#21508) 2024-04-01 22:40:14 +00:00
SawyerChunkReader.h Fix memory leak loading malformed `SawyerChunk` (#21508) 2024-04-01 22:40:14 +00:00
SawyerChunkWriter.cpp Replace 2023 with 2024 in copyright headers (#21139) 2024-01-01 12:52:28 +01:00
SawyerChunkWriter.h Replace 2023 with 2024 in copyright headers (#21139) 2024-01-01 12:52:28 +01:00