SWDEV-318128 - Add Null checks in hipGraphExecHostNodeSetParams API

Change-Id: I1363b16646b7629c827ace4db4c7b0da32486edb


[ROCm/clr commit: dcd0322f52]
This commit is contained in:
Satyanvesh Dittakavi
2022-01-12 16:06:14 +00:00
vanhempi 925805d186
commit bdc978c0e2
+2 -1
Näytä tiedosto
@@ -1515,7 +1515,8 @@ hipError_t hipGraphHostNodeSetParams(hipGraphNode_t node, const hipHostNodeParam
hipError_t hipGraphExecHostNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node,
const hipHostNodeParams* pNodeParams) {
HIP_INIT_API(hipGraphExecHostNodeSetParams, hGraphExec, node, pNodeParams);
if (pNodeParams->fn == nullptr || pNodeParams->userData == nullptr) {
if (hGraphExec == nullptr || pNodeParams == nullptr ||
pNodeParams->fn == nullptr || pNodeParams->userData == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
hipGraphNode_t clonedNode = hGraphExec->GetClonedNode(node);