Commit 20752367 authored by Andy Maloney's avatar Andy Maloney

If generating a bin file (second half of conditional), make sure the file is closed

(Also fix spelling in comment)
parent 716e0192
......@@ -538,10 +538,12 @@ namespace cv
filename = clCxt->impl->Binpath + kernelName + "_" + clCxt->impl->devName + ".clb";
}
FILE *fp;
fp = fopen(filename.c_str(), "rb");
if(fp == NULL || clCxt->impl->Binpath.size() == 0) //we should genetate a binary file for the first time.
FILE *fp = fopen(filename.c_str(), "rb");
if(fp == NULL || clCxt->impl->Binpath.size() == 0) //we should generate a binary file for the first time.
{
if(fp != NULL)
fclose(fp);
program = clCreateProgramWithSource(
clCxt->impl->clContext, 1, source, NULL, &status);
openCLVerifyCall(status);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment