Using auto_vec ensures that the buffer is always free'd when the function returns.
PR gcc/gcov-profile 120634 gcc/ChangeLog: * prime-paths.cc (trie::paths): Use auto_vec. --- gcc/prime-paths.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/prime-paths.cc b/gcc/prime-paths.cc index 838343c8427..38feeea1522 100644 --- a/gcc/prime-paths.cc +++ b/gcc/prime-paths.cc @@ -635,7 +635,7 @@ trie::insert_with_suffix (array_slice<const int> path) vec<vec<int>> trie::paths () const { - vec<int> path {}; + auto_vec<int> path {}; vec<vec<int>> all {}; auto iter = paths (path); while (iter.next ()) -- 2.39.5