diff options
| author | Peter LaFosse <peter@vector35.com> | 2025-04-14 08:33:03 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2025-04-29 09:16:13 -0400 |
| commit | 6697a9d2ce4bf7d544f98dafea7edfaecd7b6731 (patch) | |
| tree | 722cbb75a8331131caa1e57588815a3121f4bbc5 /python/binaryview.py | |
| parent | d1722c0b34f313590f1f5a1274985433a58a7a5f (diff) | |
Fix memory leaks in Sections, Segments, Settings, ExternalLibrary, and BackgroundTask
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 989c1f20..092f9bef 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -9545,9 +9545,7 @@ to a the type "tagRECT" found in the typelibrary "winX64common" seg = core.BNGetSegmentAt(self.handle, addr) if not seg: return None - segment_handle = core.BNNewSegmentReference(seg) - assert segment_handle is not None, "core.BNNewSegmentReference returned None" - return Segment(segment_handle) + return Segment(seg) def get_address_for_data_offset(self, offset: int) -> Optional[int]: """ @@ -9639,9 +9637,7 @@ to a the type "tagRECT" found in the typelibrary "winX64common" section = core.BNGetSectionByName(self.handle, name) if section is None: return None - section_handle = core.BNNewSectionReference(section) - assert section_handle is not None, "core.BNNewSectionReference returned None" - result = Section(section_handle) + result = Section(section) return result def get_unique_section_names(self, name_list: List[str]) -> List[str]: |
