From 5646f03f9a61feb24584a8a5da94027783b16e5a Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Fri, 18 Mar 2022 12:35:46 -0400 Subject: Fix a bunch of reference miscounts in the C++ and python apis --- platform.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'platform.cpp') diff --git a/platform.cpp b/platform.cpp index 68e812dc..b3ec68e8 100644 --- a/platform.cpp +++ b/platform.cpp @@ -349,7 +349,7 @@ Ref Platform::GetTypeByName(const QualifiedName& name) QualifiedName::FreeAPIObject(&nameObj); if (!type) return nullptr; - return new Type(type); + return new Type(BNNewTypeReference(type)); } @@ -360,7 +360,7 @@ Ref Platform::GetVariableByName(const QualifiedName& name) QualifiedName::FreeAPIObject(&nameObj); if (!type) return nullptr; - return new Type(type); + return new Type(BNNewTypeReference(type)); } @@ -371,7 +371,7 @@ Ref Platform::GetFunctionByName(const QualifiedName& name, bool exactMatch QualifiedName::FreeAPIObject(&nameObj); if (!type) return nullptr; - return new Type(type); + return new Type(BNNewTypeReference(type)); } @@ -389,7 +389,7 @@ Ref Platform::GetSystemCallType(uint32_t n) BNType* type = BNGetPlatformSystemCallType(m_object, n); if (!type) return nullptr; - return new Type(type); + return new Type(BNNewTypeReference(type)); } -- cgit v1.3.1