Allow nullptr as clMemFreeINTEL argument

Change-Id: I2746fa21a2971c0e9c2abb003c61a3b2dbef623c
Related-To: NEO-3521
This commit is contained in:
Lukasz Towarek
2019-07-24 11:19:59 +02:00
parent a1422fab42
commit f2c18295fd
2 changed files with 7 additions and 1 deletions

View File

@@ -3453,7 +3453,7 @@ cl_int clMemFreeINTEL(
return retVal;
}
if (!neoContext->getSVMAllocsManager()->freeSVMAlloc(const_cast<void *>(ptr))) {
if (ptr && !neoContext->getSVMAllocsManager()->freeSVMAlloc(const_cast<void *>(ptr))) {
return CL_INVALID_VALUE;
}