Skip to content

Commit

Permalink
Merge pull request #57 from fsteggink/nlextract_memory_fix
Browse files Browse the repository at this point in the history
Fix for NLExtract memory issue, #211
  • Loading branch information
justb4 committed Oct 4, 2017
2 parents d2f3d4b + 9eb4510 commit 8483ffa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stetl/filters/xmlelementreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ def process_xml(self, packet):

if self.strip_namespaces:
packet.data = Util.stripNamespaces(elem).getroot()

# Clear the root element, since iterparse still builds a tree
# See http://effbot.org/zone/element-iterparse.htm
self.root.clear()

# If there is a next component, let it process
if self.next:
Expand Down

0 comments on commit 8483ffa

Please sign in to comment.