Fix memory leak in set and map.
authorEric Fiselier <eric@efcs.ca>
Thu, 11 Jul 2019 23:13:38 +0000 (23:13 +0000)
committerEric Fiselier <eric@efcs.ca>
Thu, 11 Jul 2019 23:13:38 +0000 (23:13 +0000)
commit41798c05cd20401b3f77d12b8bfcb0437132021f
tree7cc2e4424b6e3dc941421df29e7d90adc5ac2369
parent6f8f1a7db7b23dfa30d8de9df9450d8355475974
Fix memory leak in set and map.

When assigning an initializer list into set/map, libc++ would
leak memory if the initializer list contained equivalent keys
because we failed to check if the insertion was successful.

llvm-svn: 365840
libcxx/include/__tree
libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp