diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-09 22:05:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-09 22:49:27 +0300 |
commit | 24f18983923cc63706e3c5c8a5db6bb073e7afb7 (patch) | |
tree | 34ddecba5ab012166720ce3b014364dd3eb86ff8 /bpkg/rep-list.cxx | |
parent | f492f67ced0db166bb9e0840252be616c5be0f67 (diff) |
Fix memory leak due to complement repository cycles
Diffstat (limited to 'bpkg/rep-list.cxx')
-rw-r--r-- | bpkg/rep-list.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bpkg/rep-list.cxx b/bpkg/rep-list.cxx index e186665..71a66e4 100644 --- a/bpkg/rep-list.cxx +++ b/bpkg/rep-list.cxx @@ -65,7 +65,7 @@ namespace bpkg if (o.complements ()) { - for (const lazy_shared_ptr<repository>& rp: fr->complements) + for (const lazy_weak_ptr<repository>& rp: fr->complements) { // Skip the root complement (see rep_fetch() for details). // @@ -114,7 +114,7 @@ namespace bpkg shared_ptr<repository_fragment> root (db.load<repository_fragment> ("")); - for (const lazy_shared_ptr<repository>& rp: root->complements) + for (const lazy_weak_ptr<repository>& rp: root->complements) { shared_ptr<repository> r (rp.load ()); cout << r->location.canonical_name () << " " << r->location << endl; |