SWDEV-316819 - graph check ChildGraphNodeGetGraph

Change-Id: Id3a4fb64e6fb5ce37e97f1f3518e09c8bd9a2d0c


[ROCm/clr commit: 8618b1cd07]
This commit is contained in:
Payam
2022-03-23 15:30:06 -04:00
committed by Payam Ghafari
parent 2a3f5a5321
commit 8a6fd0bd65
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -1211,11 +1211,11 @@ hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNo
hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t* pGraph) {
HIP_INIT_API(hipGraphChildGraphNodeGetGraph, node, pGraph);
if (node == nullptr || pGraph == nullptr) {
if (node == nullptr || pGraph == nullptr || !hipGraphNode::isNodeValid(node)) {
HIP_RETURN(hipErrorInvalidValue);
}
*pGraph = reinterpret_cast<hipChildGraphNode*>(node)->GetChildGraph();
if (pGraph == nullptr) {
*pGraph = reinterpret_cast<hipGraphNode*>(node)->GetChildGraph();
if (*pGraph == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
HIP_RETURN(hipSuccess);