SWDEV-317111 - null ptr check for hipGraphGetEdges

Change-Id: I00b7e4d05864b01bfabdf11ea9ba1f2987e4707c


[ROCm/clr commit: 1f00d8c541]
This commit is contained in:
Ajay
2022-01-24 22:41:32 +00:00
committed by Ajay GunaShekar
orang tua beab7326a9
melakukan 4048789d06
+2 -1
Melihat File
@@ -1187,7 +1187,8 @@ hipError_t hipGraphRemoveDependencies(hipGraph_t graph, const hipGraphNode_t* fr
hipError_t hipGraphGetEdges(hipGraph_t graph, hipGraphNode_t* from, hipGraphNode_t* to,
size_t* numEdges) {
HIP_INIT_API(hipGraphGetEdges, graph, from, to, numEdges);
if (graph == nullptr || numEdges == nullptr) {
if (graph == nullptr || numEdges == nullptr ||
from == nullptr || to == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
const std::vector<std::pair<Node, Node>> edges = graph->GetEdges();