From a3f17e7076bcb5c3d7eb000a41a34f8aeb3744e6 Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Tue, 5 Aug 2025 11:37:26 +0200 Subject: [PATCH] - fixed memory leak --- snapper/Btrfs.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/snapper/Btrfs.cc b/snapper/Btrfs.cc index 355305cb..e10053dc 100644 --- a/snapper/Btrfs.cc +++ b/snapper/Btrfs.cc @@ -767,12 +767,15 @@ namespace snapper bool StreamProcessor::get_root_id(const string& path, u64* root_id) { - struct subvol_info* si; - si = subvol_uuid_search(&sus, 0, NULL, 0, path.c_str(), subvol_search_by_path); + struct subvol_info* si = subvol_uuid_search(&sus, 0, NULL, 0, path.c_str(), subvol_search_by_path); if (!si) return false; *root_id = si->root_id; + + free(si->path); + free(si); + return true; } -- 2.47.3