Skip to content

Commit

Permalink
Merge pull request #386 from daniel-mekuria/fix_access_lock_on_pe_file
Browse files Browse the repository at this point in the history
fixed a memory leak that caused the pe file to be access locked.
  • Loading branch information
erocarrera authored Jan 11, 2024
2 parents b94ca95 + 91fb851 commit d0eae2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import string
import mmap
import uuid
import gc


from collections import Counter
from typing import Union
Expand Down Expand Up @@ -2962,6 +2964,7 @@ def _close_data(self):
):
self.__data__.close()
del self.__data__
gc.collect()

def close(self):
self._close_data()
Expand Down

0 comments on commit d0eae2a

Please sign in to comment.