2
0

Don't crash for hipEventDestroy(NULL)

Change-Id: I3f4de1ad2712dbe8af81e10c5d3bef16d468c582


[ROCm/clr commit: 21de66889c]
Este cometimento está contido em:
Maneesh Gupta
2017-07-18 11:01:02 +05:30
ascendente 61d1e7a7c9
cometimento a73a17763d
+8 -5
Ver ficheiro
@@ -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)