From fd40266f767e51e649fb48376e25f47a60d79765 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Mon, 11 May 2026 18:49:26 -0700 Subject: Fix incorrect reference counting in C++ API --- binaryview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'binaryview.cpp') diff --git a/binaryview.cpp b/binaryview.cpp index c1886ab9..6c4312c0 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -5728,7 +5728,7 @@ Ref BinaryView::GetExternalLibrary(const std::string& name) BNExternalLibrary* lib = BNBinaryViewGetExternalLibrary(m_object, name.c_str()); if (!lib) return nullptr; - return new ExternalLibrary(BNNewExternalLibraryReference(lib)); + return new ExternalLibrary(lib); } @@ -5759,7 +5759,7 @@ Ref BinaryView::AddExternalLocation(Ref sourceSymbol, if (!loc) return nullptr; - return new ExternalLocation(BNNewExternalLocationReference(loc)); + return new ExternalLocation(loc); } @@ -5774,7 +5774,7 @@ Ref BinaryView::GetExternalLocation(Ref sourceSymbol) BNExternalLocation* loc = BNBinaryViewGetExternalLocation(m_object, sourceSymbol->GetObject()); if (!loc) return nullptr; - return new ExternalLocation(BNNewExternalLocationReference(loc)); + return new ExternalLocation(loc); } -- cgit v1.3.1