From: Arvin Schnell Date: Tue, 5 Aug 2025 09:37:26 +0000 (+0200) Subject: - fixed memory leak X-Git-Tag: v0.13.0~10^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1043%2Fhead;p=thirdparty%2Fsnapper.git - fixed memory leak --- 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; }