diff --git a/src/core/context_pool.h b/src/core/context_pool.h index c5c45cc5..c9842881 100644 --- a/src/core/context_pool.h +++ b/src/core/context_pool.h @@ -156,7 +156,9 @@ class ContextPool { entry_t* entry = reinterpret_cast(ptr); Context::Destroy(entry->context); } - free(array_); + if (constructed_) { + free(array_); + } } char* GetArrayPtr(const uint32_t& index) { return array_ + (index % array_size_bytes_); } diff --git a/src/core/intercept_queue.cpp b/src/core/intercept_queue.cpp index 720026ca..bdad0393 100644 --- a/src/core/intercept_queue.cpp +++ b/src/core/intercept_queue.cpp @@ -29,7 +29,7 @@ void InterceptQueue::HsaIntercept(HsaApiTable* table) { } InterceptQueue::mutex_t InterceptQueue::mutex_; -rocprofiler_queue_callbacks_t InterceptQueue::callbacks_ = {}; +rocprofiler_queue_callbacks_t InterceptQueue::callbacks_ = {NULL,NULL,NULL}; void* InterceptQueue::callback_data_ = NULL; std::atomic InterceptQueue::dispatch_callback_{NULL}; InterceptQueue::obj_map_t InterceptQueue::obj_map_{};