From 610aa33a8bad92d5349b31dad5556c574dedf07d Mon Sep 17 00:00:00 2001 From: sdashmiz Date: Mon, 21 Mar 2022 11:01:22 -0400 Subject: [PATCH] SWDEV-328556: check for wait event node type Signed-off-by: sdashmiz Change-Id: I4b70cb576df1ab31503d9089591026bebe4df16a --- hipamd/src/hip_graph.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hipamd/src/hip_graph.cpp b/hipamd/src/hip_graph.cpp index ba6f187dc0..9a0fc62d74 100644 --- a/hipamd/src/hip_graph.cpp +++ b/hipamd/src/hip_graph.cpp @@ -1663,7 +1663,8 @@ hipError_t hipGraphAddEventWaitNode(hipGraphNode_t* pGraphNode, hipGraph_t graph hipError_t hipGraphEventWaitNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out) { HIP_INIT_API(hipGraphEventWaitNodeGetEvent, node, event_out); - if (node == nullptr || event_out == nullptr) { + if (node == nullptr || event_out == nullptr || + node->GetType() != hipGraphNodeTypeWaitEvent) { HIP_RETURN(hipErrorInvalidValue); } reinterpret_cast(node)->GetParams(event_out);