aboutsummaryrefslogtreecommitdiff
path: root/bpkg/package.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-07-09 22:05:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-07-09 22:49:27 +0300
commit24f18983923cc63706e3c5c8a5db6bb073e7afb7 (patch)
tree34ddecba5ab012166720ce3b014364dd3eb86ff8 /bpkg/package.cxx
parentf492f67ced0db166bb9e0840252be616c5be0f67 (diff)
Fix memory leak due to complement repository cycles
Diffstat (limited to 'bpkg/package.cxx')
-rw-r--r--bpkg/package.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/bpkg/package.cxx b/bpkg/package.cxx
index dea16f2..66e9ba1 100644
--- a/bpkg/package.cxx
+++ b/bpkg/package.cxx
@@ -88,7 +88,7 @@ namespace bpkg
return i.fragment == lrf;
};
- for (const lazy_shared_ptr<repository>& r: cs)
+ for (const lazy_weak_ptr<repository>& r: cs)
{
const auto& frs (r.load ()->fragments);
@@ -110,7 +110,7 @@ namespace bpkg
// Finally, load the complements and prerequisites and check them
// recursively.
//
- for (const lazy_shared_ptr<repository>& cr: cs)
+ for (const lazy_weak_ptr<repository>& cr: cs)
{
for (const auto& fr: cr.load ()->fragments)
{