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/typelibrary.py | |
| parent | a3939bdec15f9299ae9a681255fa93c47113870a (diff) | |
Fix Type object leaks
Diffstat (limited to 'python/typelibrary.py')
| -rw-r--r-- | python/typelibrary.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/typelibrary.py b/python/typelibrary.py index e844d419..f13fbb1a 100644 --- a/python/typelibrary.py +++ b/python/typelibrary.py @@ -333,7 +333,7 @@ class TypeLibrary: t = core.BNGetTypeLibraryNamedObject(self.handle, name._to_core_struct()) if t is None: return None - return types.Type.create(core.BNNewTypeReference(t)) + return types.Type.create(t) def get_named_type(self, name: Union[str, types.QualifiedName]) -> Optional[types.Type]: """ @@ -349,7 +349,7 @@ class TypeLibrary: t = core.BNGetTypeLibraryNamedType(self.handle, name._to_core_struct()) if t is None: return None - return types.Type.create(core.BNNewTypeReference(t)) + return types.Type.create(t) @property def named_objects(self) -> Dict[types.QualifiedName, types.Type]: |
