1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-13 23:46:40 +00:00

fs: fix memory leak when path is reallocated (closes #1842)

This commit is contained in:
Michael Scire 2022-04-08 11:02:17 -07:00
parent 80154b0a54
commit 106599895d

View file

@ -54,6 +54,10 @@ namespace ams::fs {
} }
constexpr WriteBuffer &operator=(WriteBuffer &&rhs) { constexpr WriteBuffer &operator=(WriteBuffer &&rhs) {
if (m_buffer != nullptr) {
::ams::fs::impl::Deallocate(m_buffer, this->GetLength());
}
m_buffer = rhs.m_buffer; m_buffer = rhs.m_buffer;
m_length_and_is_normalized = rhs.m_length_and_is_normalized; m_length_and_is_normalized = rhs.m_length_and_is_normalized;