diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-07-16 11:22:50 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-07-16 11:22:50 +0200 |
| commit | 545aadebb1125fdc5118ca0f556ea4887d74b6a4 (patch) | |
| tree | 94ca12cbe97da707ab9c002f5d7df97136a6637f /libs | |
| parent | 4c08db1e4a66109939181fd5224ecb324694162d (diff) | |
| download | kernel-545aadebb1125fdc5118ca0f556ea4887d74b6a4.tar.xz kernel-545aadebb1125fdc5118ca0f556ea4887d74b6a4.zip | |
kstd: fix memory leak in weak_ptr
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/kstd/kstd/bits/shared_ptr.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/kstd/kstd/bits/shared_ptr.hpp b/libs/kstd/kstd/bits/shared_ptr.hpp index 99301cbe..33d52e1c 100644 --- a/libs/kstd/kstd/bits/shared_ptr.hpp +++ b/libs/kstd/kstd/bits/shared_ptr.hpp @@ -185,7 +185,7 @@ namespace kstd { if (m_control_block) { - if (!m_control_block->weak_count.fetch_sub(1)) + if (!--m_control_block->weak_count) { delete m_control_block; m_control_block = nullptr; |
