summaryrefslogtreecommitdiff
path: root/debuginfo.cpp
diff options
context:
space:
mode:
authorMark Rowe <mark@vector35.com>2026-05-11 18:49:26 -0700
committerMark Rowe <mark@vector35.com>2026-05-19 10:36:46 -0700
commitfd40266f767e51e649fb48376e25f47a60d79765 (patch)
treedb351a36617200d4ad659bb3c1aa921b8d08f204 /debuginfo.cpp
parent297a98bff289ecde90d808f6538c2c5edf804af6 (diff)
Fix incorrect reference counting in C++ API
Diffstat (limited to 'debuginfo.cpp')
-rw-r--r--debuginfo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/debuginfo.cpp b/debuginfo.cpp
index e0ab328c..3a337bc7 100644
--- a/debuginfo.cpp
+++ b/debuginfo.cpp
@@ -371,7 +371,7 @@ Ref<DebugInfoParser> DebugInfoParser::GetByName(const string& name)
{
BNDebugInfoParser* parser = BNGetDebugInfoParserByName(name.c_str());
if (parser)
- return new DebugInfoParser(BNNewDebugInfoParserReference(parser));
+ return new DebugInfoParser(parser);
return nullptr;
}
@@ -472,6 +472,5 @@ bool CustomDebugInfoParser::ParseCallback(void* ctxt, BNDebugInfo* debugInfo, BN
CustomDebugInfoParser::CustomDebugInfoParser(const string& name) :
- DebugInfoParser(
- BNNewDebugInfoParserReference(BNRegisterDebugInfoParser(name.c_str(), IsValidCallback, ParseCallback, this)))
+ DebugInfoParser(BNRegisterDebugInfoParser(name.c_str(), IsValidCallback, ParseCallback, this))
{}