From 745d799f9bdc4805f767def106205ef9d6d64ecb Mon Sep 17 00:00:00 2001 From: Longlong Yao Date: Sat, 14 Sep 2024 11:37:30 +0800 Subject: [PATCH] rocrtst: fix resource leak Change-Id: Ib57dccad0b639539e1076daba31eef278f2cf638 Signed-off-by: Longlong Yao [ROCm/ROCR-Runtime commit: 3b829d0e62279dcea2826303cb024246139322a0] --- projects/rocr-runtime/rocrtst/common/base_rocr_utils.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/rocr-runtime/rocrtst/common/base_rocr_utils.cc b/projects/rocr-runtime/rocrtst/common/base_rocr_utils.cc index 44013e9d43..074ba8346e 100755 --- a/projects/rocr-runtime/rocrtst/common/base_rocr_utils.cc +++ b/projects/rocr-runtime/rocrtst/common/base_rocr_utils.cc @@ -402,7 +402,10 @@ hsa_status_t InitializeAQLPacket(const BaseRocR* test, // called before this function, so we don't want overwrite it, therefore // we ignore it in this function. - err = hsa_signal_create(1, 0, NULL, &aql->completion_signal); + if (!aql->completion_signal.handle) + err = hsa_signal_create(1, 0, NULL, &aql->completion_signal); + else + err = HSA_STATUS_SUCCESS; return err; }