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.
Please register or sign in to comment