aboutsummaryrefslogtreecommitdiff
path: root/gdb/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/charset.c')
-rw-r--r--gdb/charset.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/charset.c b/gdb/charset.c
index 74f742e..a6261fc 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -694,7 +694,13 @@ struct charset_vector
{
~charset_vector ()
{
- clear ();
+ /* Note that we do not call charset_vector::clear, which would also xfree
+ the elements. This destructor is only called after exit, at which point
+ those will be freed anyway on process exit, so not freeing them now is
+ not classified as a memory leak. OTOH, freeing them now might be
+ classified as a data race, because some worker thread might still be
+ accessing them. */
+ charsets.clear ();
}
void clear ()