diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2023-01-26 16:37:39 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2023-01-30 11:57:43 -0500 |
| commit | 6ed8f189b2a0607a13c2a2163d82993ca60d2a19 (patch) | |
| tree | bec8293f894c664f29edeaa64eddee609aada8b5 /python/variable.py | |
| parent | a3939bdec15f9299ae9a681255fa93c47113870a (diff) | |
Fix Type object leaks
Diffstat (limited to 'python/variable.py')
| -rw-r--r-- | python/variable.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/python/variable.py b/python/variable.py index 14929557..ee0d93a4 100644 --- a/python/variable.py +++ b/python/variable.py @@ -728,9 +728,7 @@ class Variable(CoreVariable): def type(self) -> Optional['binaryninja.types.Type']: var_type_conf = core.BNGetVariableType(self._function.handle, self.to_BNVariable()) if var_type_conf.type: - ref_handle = core.BNNewTypeReference(var_type_conf.type) - assert ref_handle is not None, f"core.BNNewTypeReference returned None {var_type_conf} {var_type_conf.type}" - return binaryninja.types.Type.create(ref_handle, self._function.platform, var_type_conf.confidence) + return binaryninja.types.Type.create(var_type_conf.type, self._function.platform, var_type_conf.confidence) return None @type.setter |
