[vigra_ext/NearestFeatureTransform.h:144]: (error) Resource leak: f
Bug #1295033 reported by
dcb
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Hugin |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Source code is
FILE * f = fopen(file,"wb+");
if (f == NULL) {
std::cerr << "enblend: error creating temporary file." << std::endl;
exit(1);
}
size_t size = w*h;
size_t itemsWritten = fwrite(ptr, sizeof(dist_t), size, f);
if (itemsWritten < size) {
std::cerr << "enblend: error writing to temporary file." << std::endl;
exit(1);
}
Suggest add missing call to fclose.
Changed in hugin: | |
milestone: | none → 2015.0beta1 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Theoretically this is a resource leak, but practical not: The code is not compiled (only when setting some additional DEBUG statements). And when it is compiled, the mentioned function is never called. So this change is purely cosmetic in a comment.
Nevertheless the functions was removed from the repo.