Fix clang-tidy-14 NewDeleteLeaks warning

Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
This commit is contained in:
Daniel Chabrowski
2022-07-19 11:27:29 +00:00
committed by Compute-Runtime-Automation
parent 4ac6e09117
commit 4ec546640f

View File

@@ -1920,11 +1920,11 @@ TEST_F(DrmMemoryManagerTestPrelim, givenDrmMemoryManagerWhenGetLocalMemorySizeIs
MockExecutionEnvironment executionEnvironment(&hwInfo, true, 4u);
for (auto i = 0u; i < 4u; i++) {
auto drm = new DrmQueryMock(*executionEnvironment.rootDeviceEnvironments[i], &hwInfo);
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment.rootDeviceEnvironments[i], &hwInfo);
ASSERT_NE(nullptr, drm);
executionEnvironment.rootDeviceEnvironments[i]->osInterface = std::make_unique<OSInterface>();
executionEnvironment.rootDeviceEnvironments[i]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drm));
executionEnvironment.rootDeviceEnvironments[i]->osInterface->setDriverModel(std::move(drm));
}
TestedDrmMemoryManager memoryManager(executionEnvironment);
for (auto i = 0u; i < 4u; i++) {