diff options
| author | Mark Rowe <mark@vector35.com> | 2026-05-11 18:49:26 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2026-05-19 10:36:46 -0700 |
| commit | fd40266f767e51e649fb48376e25f47a60d79765 (patch) | |
| tree | db351a36617200d4ad659bb3c1aa921b8d08f204 /binaryview.cpp | |
| parent | 297a98bff289ecde90d808f6538c2c5edf804af6 (diff) | |
Fix incorrect reference counting in C++ API
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index c1886ab9..6c4312c0 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -5728,7 +5728,7 @@ Ref<ExternalLibrary> 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<ExternalLocation> BinaryView::AddExternalLocation(Ref<Symbol> sourceSymbol, if (!loc) return nullptr; - return new ExternalLocation(BNNewExternalLocationReference(loc)); + return new ExternalLocation(loc); } @@ -5774,7 +5774,7 @@ Ref<ExternalLocation> BinaryView::GetExternalLocation(Ref<Symbol> sourceSymbol) BNExternalLocation* loc = BNBinaryViewGetExternalLocation(m_object, sourceSymbol->GetObject()); if (!loc) return nullptr; - return new ExternalLocation(BNNewExternalLocationReference(loc)); + return new ExternalLocation(loc); } |
