mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 11:09:06 +08:00
opencl: Fix mismatched new[] / free
valgrind report: Mismatched free() / delete / delete [] gpuInfo->mpArryDevsID is created by "new cl_device_id[1]", so it must be destroyed by delete[]. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
7f57ac4a94
commit
ab8209cbcb
@ -375,7 +375,7 @@ int OpenclDevice::ReleaseOpenclEnv( GPUEnv *gpuInfo )
|
||||
}
|
||||
isInited = 0;
|
||||
gpuInfo->mnIsUserCreated = 0;
|
||||
free( gpuInfo->mpArryDevsID );
|
||||
delete[] gpuInfo->mpArryDevsID;
|
||||
return 1;
|
||||
}
|
||||
int OpenclDevice::BinaryGenerated( const char * clFileName, FILE ** fhandle )
|
||||
|
Loading…
Reference in New Issue
Block a user