Re: [PATCH v2 18/21] libcc1: fix a memory leak

2021-04-28 Thread Jeff Law via Gcc-patches
On 4/27/2021 7:01 PM, Tom Tromey wrote: libcc1 has a memory leak when calling fork_exec -- it allocates a new vector of arguments, but then does not free it anywhere. This patch changes this code to use std::vector instead. Note that the previous code tried to avoid bad_alloc. I don't

[PATCH v2 18/21] libcc1: fix a memory leak

2021-04-27 Thread Tom Tromey
libcc1 has a memory leak when calling fork_exec -- it allocates a new vector of arguments, but then does not free it anywhere. This patch changes this code to use std::vector instead. Note that the previous code tried to avoid bad_alloc. I don't believe this is very important. For one thing,