diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-11 12:30:35 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-11 12:30:35 +0200 |
commit | f282df661724334fbf5f0b9d3123162aad57d1fa (patch) | |
tree | 64b88e74aa295f766cc17c036dbb9e7570ab90b6 /AK/Buffer.h | |
parent | 0abc19b0ff50b5919f7cbac180af822638f89652 (diff) | |
download | serenity-f282df661724334fbf5f0b9d3123162aad57d1fa.zip |
AK::Buffer should not free unowned backing stores, duh.
Diffstat (limited to 'AK/Buffer.h')
-rw-r--r-- | AK/Buffer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/AK/Buffer.h b/AK/Buffer.h index 21d2da49ed..91ef48cda2 100644 --- a/AK/Buffer.h +++ b/AK/Buffer.h @@ -23,7 +23,8 @@ public: { if (!m_elements) return; - kfree(m_elements); + if (m_owned) + kfree(m_elements); m_elements = nullptr; } |