]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix a couple of memory leaks in the C++ frontend
authorPatrick Palka <ppalka@redhat.com>
Thu, 16 Jan 2020 21:46:40 +0000 (16:46 -0500)
committerPatrick Palka <ppalka007@gmail.com>
Wed, 22 Jan 2020 16:13:02 +0000 (11:13 -0500)
commitbf91504dc23f17248df6302f7bad849f3ddedee7
tree84a2687ae29c5334be0d8a435c36b58acadcf8d4
parent7c46e71d016c86971ac26c6fa38d76482859f296
Fix a couple of memory leaks in the C++ frontend

The leak in get_mapped_args is due to auto_vec not properly supporting
destructible elements in that auto_vec's destructor doesn't call the
destructors of its elements.

gcc/cp/ChangeLog:

* constraint.cc (get_mapped_args): Avoid using auto_vec
as a vector element.  Release the vectors inside the lists
vector.
* parser.c (cp_literal_operator_id): Free the buffer.
gcc/cp/ChangeLog
gcc/cp/constraint.cc
gcc/cp/parser.c