Fix some noise seen in "make selftest-valgrind".

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r15-4805-gd1d3c17258a564.

gcc/ChangeLog:
        * diagnostic.cc (diagnostic_context::finish): Delete and reset
        m_option_mgr.

Signed-off-by: David Malcolm <dmalc...@redhat.com>
---
 gcc/diagnostic.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/diagnostic.cc b/gcc/diagnostic.cc
index 477214c15f2b..ecc4bd94eba1 100644
--- a/gcc/diagnostic.cc
+++ b/gcc/diagnostic.cc
@@ -420,6 +420,9 @@ diagnostic_context::finish ()
       m_client_data_hooks = nullptr;
     }
 
+  delete m_option_mgr;
+  m_option_mgr = nullptr;
+
   delete m_urlifier;
   m_urlifier = nullptr;
 
-- 
2.26.3

Reply via email to