Merge pull request #101 from mangupta/issue47

Don't crash for hipEventDestroy(NULL)

[ROCm/clr commit: d27f971c8b]
This commit is contained in:
Maneesh Gupta
2017-07-18 11:18:23 +05:30
کامیت شده توسط GitHub
کامیت 4389378614
@@ -164,13 +164,16 @@ hipError_t hipEventDestroy(hipEvent_t event)
{
HIP_INIT_API(event);
event->_state = hipEventStatusUnitialized;
if (event) {
event->_state = hipEventStatusUnitialized;
delete event;
event = NULL;
delete event;
event = NULL;
// TODO - examine return additional error codes
return ihipLogStatus(hipSuccess);
return ihipLogStatus(hipSuccess);
} else {
return ihipLogStatus(hipErrorInvalidResourceHandle);
}
}
hipError_t hipEventSynchronize(hipEvent_t event)