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:
Stefan Weil 2016-10-29 16:51:48 +02:00
parent 7f57ac4a94
commit ab8209cbcb

View File

@ -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 )