IVGCVSW-4552 Fix Wrapper Object Use after free in ProfilerTests
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I84ab68c048675a39a67045430b2dde571b45e479
diff --git a/src/armnn/test/ProfilerTests.cpp b/src/armnn/test/ProfilerTests.cpp
index 9376fa4..40e9f47 100644
--- a/src/armnn/test/ProfilerTests.cpp
+++ b/src/armnn/test/ProfilerTests.cpp
@@ -57,6 +57,8 @@
// Check that the profiler has been un-registered for this thread.
res &= !profilerManager.GetProfiler();
+
+ armnn::ProfilerManager::GetInstance().RegisterProfiler(nullptr);
}
} // namespace
@@ -351,6 +353,7 @@
"unit\": \"us\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n");
BOOST_CHECK(output == blessedOutput);
+ armnn::ProfilerManager::GetInstance().RegisterProfiler(nullptr);
}
BOOST_AUTO_TEST_SUITE_END();