mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 23:37:14 +02:00
funcs name only in c++, bug fix:slsdetectorusers not deleting multislsdetectorcommand object, bug fix: programfpga does not delete fpgasrc malloc if returning in failure
This commit is contained in:
@ -5101,12 +5101,16 @@ int slsDetector::programFPGA(std::string fname) {
|
||||
if(fread(fpgasrc, sizeof(char), filesize, fp) != filesize){
|
||||
std::cout << "Could not read rawbin file" << std::endl;
|
||||
setErrorMask((getErrorMask())|(PROGRAMMING_ERROR));
|
||||
if(fpgasrc != NULL)
|
||||
free(fpgasrc);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if(fclose(fp)){
|
||||
std::cout << "Could not close destination file after converting" << std::endl;
|
||||
setErrorMask((getErrorMask())|(PROGRAMMING_ERROR));
|
||||
if(fpgasrc != NULL)
|
||||
free(fpgasrc);
|
||||
return FAIL;
|
||||
}
|
||||
unlink(destfname); // delete temporary file
|
||||
|
Reference in New Issue
Block a user