[vigra_ext/NearestFeatureTransform.h:144]: (error) Resource leak: f

Bug #1295033 reported by dcb
6
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;
        perror("reason");
        exit(1);
    }

Suggest add missing call to fclose.

Revision history for this message
tmodes (tmodes) wrote :

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.

Changed in hugin:
status: New → Fix Committed
tmodes (tmodes)
Changed in hugin:
milestone: none → 2015.0beta1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.