SWDEV-332604 - Add nullptr check for argument pitch

Change-Id: I6d7aa5356a74b92f21f7a51a7d3e2f8d0b920e07
Αυτή η υποβολή περιλαμβάνεται σε:
Rakesh Roy authored and Rakesh Roy committed 2022-04-22 00:13:24 -04:00
1 γονέας fd17b53ea4
υποβολή 2613ebf157
1 file changed
+1 -1
@@ -653,7 +653,7 @@ hipError_t ihipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t heigh
amd::Device* device = hip::getCurrentDevice()->devices()[0];
if (ptr == nullptr) {
if ((ptr == nullptr) || (pitch == nullptr)) {
return hipErrorInvalidValue;
}