]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/58737 (leak in std::regex_match)
authorTim Shen <timshen91@gmail.com>
Tue, 15 Oct 2013 15:01:44 +0000 (15:01 +0000)
committerTim Shen <timshen@gcc.gnu.org>
Tue, 15 Oct 2013 15:01:44 +0000 (15:01 +0000)
2013-10-15  Tim Shen  <timshen91@gmail.com>

PR libstdc++/58737
* include/bits/regex_automaton.h (_Automaton<>::~_Automaton): Fix memory
leak by adding it.
* include/bits/regex_executor.h (_Executor<>::~_Executor): Likewise.

From-SVN: r203610

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex_automaton.h
libstdc++-v3/include/bits/regex_executor.h

index 6148b0b135743b1f50dbf6ddb6febd2733d4fe8e..b1d6e04d0e5430527a6964b52cb703a8c2c6ec47 100644 (file)
@@ -1,3 +1,10 @@
+2013-10-15  Tim Shen  <timshen91@gmail.com>
+
+       PR libstdc++/58737
+       * include/bits/regex_automaton.h (_Automaton<>::~_Automaton): Fix memory
+       leak by adding it.
+       * include/bits/regex_executor.h (_Executor<>::~_Executor): Likewise.
+
 2013-10-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Update.
index 60744b206625991e96824114060f4deb579e68ed..35cfc1be92f94149ca7749ec304ddbe804b9de5a 100644 (file)
@@ -112,6 +112,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       typedef size_t _SizeT;
 
     public:
+      virtual
+      ~_Automaton()
+      { }
+
       virtual _SizeT
       _M_sub_count() const = 0;
 
index 462643779f2e650eee039b23d442a03dbd6cfbe7..23b5d011545ce4d05c539c9985b5ae9742c25df9 100644 (file)
@@ -83,6 +83,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
               : __flags)
       { }
 
+      virtual
+      ~_Executor()
+      { }
+
       // Set matched when string exactly match the pattern.
       bool
       _M_match()