File: trick_source/data_products/DPX/DPV/UTILS/DPV_textbuffer.cpp
Line: 129
Issue: When the number read is not 1 the function returns without closing the file.
FROM:
numRead = fread((char *) buf, fileSize, 1, fp);
if (numRead != 1) {
delete[]buf;
return (-1); // File was not closed!
}
TO:
numRead = fread((char *) buf, fileSize, 1, fp);
if (numRead != 1) {
delete[]buf;
fclose(fp); // Make sure to close the file.
return (-1);
}
File: trick_source/data_products/DPX/DPV/UTILS/DPV_textbuffer.cpp Line: 129 Issue: When the number read is not 1 the function returns without closing the file. FROM:
TO: