From 19e04051487c2463489c7d7e13eda5e8cda8dfac Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Wed, 10 Oct 2018 09:34:24 -0400 Subject: Fix get_section_by_name API --- python/binaryview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index 7c85da17..47339427 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -3692,8 +3692,8 @@ class BinaryView(object): return result def get_section_by_name(self, name): - section = core.BNSection() - if not core.BNGetSectionByName(self.handle, name, section): + section = core.BNGetSectionByName(self.handle, name) + if not section: return None result = Section(section) core.BNFreeSection(section) -- cgit v1.3.1