From 6312556eede2d80978f7f77ce8757f5290d5a900 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Tue, 17 Aug 2021 12:24:01 +0800 Subject: Fix ref count issue in BinaryView::GetCodeReferencesForTypeField() Fix https://github.com/Vector35/binaryninja-api/issues/2590 --- binaryview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'binaryview.cpp') diff --git a/binaryview.cpp b/binaryview.cpp index db9b217b..d7040cea 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -1962,7 +1962,7 @@ vector BinaryView::GetCodeReferencesForTypeField(const Quali src.addr = refs[i].addr; src.size = refs[i].size; BNTypeWithConfidence& tc = refs[i].incomingType; - Ref type = tc.type ? new Type(tc.type) : nullptr; + Ref type = tc.type ? new Type(BNNewTypeReference(tc.type)) : nullptr; src.incomingType = Confidence>(type, tc.confidence); result.push_back(src); } -- cgit v1.3.1