mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-29 14:32:58 +02:00
fs: fix memory leak when path is reallocated (closes #1842)
This commit is contained in:
parent
6d0e0bc135
commit
a309a1273e
@ -54,6 +54,10 @@ namespace ams::fs {
|
||||
}
|
||||
|
||||
constexpr WriteBuffer &operator=(WriteBuffer &&rhs) {
|
||||
if (m_buffer != nullptr) {
|
||||
::ams::fs::impl::Deallocate(m_buffer, this->GetLength());
|
||||
}
|
||||
|
||||
m_buffer = rhs.m_buffer;
|
||||
m_length_and_is_normalized = rhs.m_length_and_is_normalized;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user