]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++tools: Fix memory leak
authorJonathan Wakely <jwakely@redhat.com>
Thu, 21 Oct 2021 21:32:23 +0000 (22:32 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 26 Oct 2021 17:16:31 +0000 (18:16 +0100)
commitc9bf4d4354b942af00193924cb59c4c6ab9cc4b5
tree1a7a061fe92252fd71adea9385e9ee07749185f0
parent7d37abedf58d664ccb9c06272303a10021ee36a7
c++tools: Fix memory leak

The allocated memory is not freed when returning early due to an error.

c++tools/ChangeLog:

* resolver.cc (module_resolver::read_tuple_file): Use unique_ptr
to ensure memory is freed before returning.
c++tools/resolver.cc