This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix memory leaks in libstdc++ tests


This fixes some more ASan errors in the testsuite. The first one is a
simple leak. The second one is mroe complicated, the test created
loads of variables to hold either a strup'd string or "", in order to
restore the original environment. Since the test exits after that
function, we don't care about restoring the environment, so can get
rid of most of the variables.

	* testsuite/20_util/specialized_algorithms/memory_management_tools/
	1.cc: Free memory.
	* testsuite/22_locale/locale/cons/5.cc: Remove redundant restoration
	of original environment and free memory.

Tested powerpc64le-linux, committed to trunk.


Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]