P4 to Git Change 2057410 by skudchad@skudchad_rocm on 2020/01/15 18:24:33
SWDEV-219341 - Free memory correctly. hiprtcProgram is a pointer by itself. So release *prog
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_rtc.cpp#10 edit
[ROCm/clr commit: 37c900f2a1]
This commit is contained in:
@@ -312,7 +312,9 @@ hiprtcResult hiprtcDestroyProgram(hiprtcProgram* prog) {
|
||||
if (prog == NULL) {
|
||||
HIPRTC_RETURN(HIPRTC_ERROR_INVALID_INPUT);
|
||||
}
|
||||
amd::Program* program = as_amd(reinterpret_cast<cl_program>(prog));
|
||||
|
||||
// Release program. hiprtcProgram is a double pointer so free *prog
|
||||
amd::Program* program = as_amd(reinterpret_cast<cl_program>(*prog));
|
||||
|
||||
program->release();
|
||||
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user