summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2018-10-10 09:34:24 -0400
committerPeter LaFosse <peter@vector35.com>2018-10-10 09:34:24 -0400
commit19e04051487c2463489c7d7e13eda5e8cda8dfac (patch)
tree986ed645ec9d4a154ee2f901b44abd02c82909ba /python
parent3d38e142e82f6473e9b615174157cef93c684eeb (diff)
Fix get_section_by_name API
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py4
1 files changed, 2 insertions, 2 deletions
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)