https://gcc.gnu.org/g:246c33ac8e8e1967c74ae20c07454a24ef02822a
commit r16-1590-g246c33ac8e8e1967c74ae20c07454a24ef02822a Author: Jørgen Kvalsvik <j...@lambda.is> Date: Thu Jun 19 20:56:30 2025 +0200 Free buffer on function exit [PR120634] Using auto_vec ensures that the buffer is always free'd when the function returns. PR gcov-profile/120634 gcc/ChangeLog: * prime-paths.cc (trie::paths): Use auto_vec. Diff: --- 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 838343c8427d..38feeea15226 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 ())