From 395c330dade439c00cb765591461f8fa44ca50eb Mon Sep 17 00:00:00 2001 From: jamesxu2 Date: Tue, 27 Aug 2024 10:20:48 -0400 Subject: [PATCH] Fix SWDEV-473314 by avoiding empty unique_ptr dereference (#371) - Revert part of https://github.com/ROCm/omnitrace/pull/78/commits/b134a68110b2c96ce11293d93ad56f38e211fd06 modifying source/lib/omnitrace/library/components/roctracer.cpp --- source/lib/omnitrace/library/components/roctracer.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/source/lib/omnitrace/library/components/roctracer.cpp b/source/lib/omnitrace/library/components/roctracer.cpp index 381508955..a419e46dc 100644 --- a/source/lib/omnitrace/library/components/roctracer.cpp +++ b/source/lib/omnitrace/library/components/roctracer.cpp @@ -314,12 +314,7 @@ void roctracer::shutdown() { auto_lock_t _lk{ type_mutex() }; - if(!roctracer_is_setup()) - { - if(!roctracer_is_init() && tim::storage::instance()) - tim::storage::instance()->reset(); - return; - } + if(!roctracer_is_setup()) return; roctracer_is_setup() = false;