← Back to team overview

hugin-devs team mailing list archive

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

 

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

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/1295033

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

Status in Hugin - Panorama Tools GUI:
  Fix Committed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/1295033/+subscriptions


References