From 69b6b8a0853a8d54151a1888e29817f67b0ee645 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Mon, 8 Jan 2024 15:16:06 -0700 Subject: Fix BinaryView::GetRelocationsAt C++ API --- binaryview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'binaryview.cpp') diff --git a/binaryview.cpp b/binaryview.cpp index ad73cc33..0d3e51c3 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -1611,7 +1611,8 @@ std::vector> BinaryView::GetRelocationsAt(uint64_t addr) const { size_t count = 0; BNRelocation** relocations = BNGetRelocationsAt(m_object, addr, &count); - std::vector> result(count); + std::vector> result; + result.reserve(count); for (size_t i = 0; i < count; i++) { result.push_back(new Relocation(relocations[i])); -- cgit v1.3.1