Merge pull request #101 from mangupta/issue47
Don't crash for hipEventDestroy(NULL)
[ROCm/hip commit: 719a5fdeb5]
This commit is contained in:
@@ -164,13 +164,16 @@ hipError_t hipEventDestroy(hipEvent_t event)
|
|||||||
{
|
{
|
||||||
HIP_INIT_API(event);
|
HIP_INIT_API(event);
|
||||||
|
|
||||||
event->_state = hipEventStatusUnitialized;
|
if (event) {
|
||||||
|
event->_state = hipEventStatusUnitialized;
|
||||||
|
|
||||||
delete event;
|
delete event;
|
||||||
event = NULL;
|
event = NULL;
|
||||||
|
|
||||||
// TODO - examine return additional error codes
|
return ihipLogStatus(hipSuccess);
|
||||||
return ihipLogStatus(hipSuccess);
|
} else {
|
||||||
|
return ihipLogStatus(hipErrorInvalidResourceHandle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hipError_t hipEventSynchronize(hipEvent_t event)
|
hipError_t hipEventSynchronize(hipEvent_t event)
|
||||||
|
|||||||
Reference in New Issue
Block a user