summaryrefslogtreecommitdiff
path: root/extractor/matchings_trie.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extractor/matchings_trie.cc')
-rw-r--r--extractor/matchings_trie.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/extractor/matchings_trie.cc b/extractor/matchings_trie.cc
index 921ec582..8ea795db 100644
--- a/extractor/matchings_trie.cc
+++ b/extractor/matchings_trie.cc
@@ -14,6 +14,9 @@ void MatchingsTrie::ResetTree(shared_ptr<TrieNode> root) {
for (auto child: root->children) {
ResetTree(child.second);
}
+ if (root->suffix_link != NULL) {
+ root->suffix_link.reset();
+ }
root.reset();
}
}