summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-10-07 21:47:55 +0800
committerMaxime Coste <mawww@kakoune.org>2017-11-01 14:05:14 +0800
commit30dacdade27a46317635ba800c6bc79a949e55be (patch)
tree59561b173671a850c6933e15a00e9a81225e9e84 /src
parent578640c8a482389beeaf6c3588663dfd5fa5461a (diff)
Regex: deallocate Saves memory on ThreadedRegexVM destruction
Diffstat (limited to 'src')
-rw-r--r--src/regex_impl.cc1
-rw-r--r--src/regex_impl.hh1
2 files changed, 1 insertions, 1 deletions
diff --git a/src/regex_impl.cc b/src/regex_impl.cc
index 659a84ec..e7991d14 100644
--- a/src/regex_impl.cc
+++ b/src/regex_impl.cc
@@ -883,7 +883,6 @@ struct TestVM : CompiledRegex, ThreadedRegexVM<const char*, dir>
}
auto test_regex = UnitTest{[]{
-
{
TestVM<> vm{R"(a*b)"};
kak_assert(vm.exec("b"));
diff --git a/src/regex_impl.hh b/src/regex_impl.hh
index d7457043..535cdf92 100644
--- a/src/regex_impl.hh
+++ b/src/regex_impl.hh
@@ -118,6 +118,7 @@ public:
for (size_t i = m_program.save_count-1; i > 0; --i)
saves->pos[i].~Iterator();
saves->~Saves();
+ ::operator delete(saves, sizeof(Saves) + (m_program.save_count-1) * sizeof(Iterator));
}
}