summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/binaryview.py')
-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)