diff options
author | Tom Tromey <tom@tromey.com> | 2021-05-04 15:26:58 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-05-05 00:06:18 -0600 |
commit | ee75ca6b72e4235aa48d6fb30c5cd274f2ff6b67 (patch) | |
tree | 5c5286afef4d3b2ded613a70c4eb509ed779509c /gcc | |
parent | a8deb8323b98fbf4c4779de4b326de72ba22469b (diff) | |
download | gcc-ee75ca6b72e4235aa48d6fb30c5cd274f2ff6b67.zip gcc-ee75ca6b72e4235aa48d6fb30c5cd274f2ff6b67.tar.gz gcc-ee75ca6b72e4235aa48d6fb30c5cd274f2ff6b67.tar.bz2 |
libcc1: fix a memory leak
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, plenty of other allocations do
not bother with this.
libcc1
* gdbctx.hh (do_compile): Use std::vector.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions