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 /platform.cpp | |
| parent | a3939bdec15f9299ae9a681255fa93c47113870a (diff) | |
Fix Type object leaks
Diffstat (limited to 'platform.cpp')
| -rw-r--r-- | platform.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform.cpp b/platform.cpp index c4d65274..e7f3aef5 100644 --- a/platform.cpp +++ b/platform.cpp @@ -381,7 +381,7 @@ Ref<Type> Platform::GetTypeByName(const QualifiedName& name) QualifiedName::FreeAPIObject(&nameObj); if (!type) return nullptr; - return new Type(BNNewTypeReference(type)); + return new Type(type); } @@ -392,7 +392,7 @@ Ref<Type> Platform::GetVariableByName(const QualifiedName& name) QualifiedName::FreeAPIObject(&nameObj); if (!type) return nullptr; - return new Type(BNNewTypeReference(type)); + return new Type(type); } @@ -403,7 +403,7 @@ Ref<Type> Platform::GetFunctionByName(const QualifiedName& name, bool exactMatch QualifiedName::FreeAPIObject(&nameObj); if (!type) return nullptr; - return new Type(BNNewTypeReference(type)); + return new Type(type); } @@ -421,7 +421,7 @@ Ref<Type> Platform::GetSystemCallType(uint32_t n) BNType* type = BNGetPlatformSystemCallType(m_object, n); if (!type) return nullptr; - return new Type(BNNewTypeReference(type)); + return new Type(type); } |
