Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-18690

Coverity analysis defect 11213: Resource leak

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • Platform 8 08/28/15

    Description

      Leak of memory or pointers to system resources

      Defect 11213 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /src/third_party/v8/src/platform-posix.cc
      Function v8::internal::OS::FOpen(const char *, const char *)
      /src/third_party/v8/src/platform-posix.cc, line: 211
      Storage is returned from allocation function "fopen".

            FILE* file = fopen(path, mode);

      /src/third_party/v8/src/platform-posix.cc, line: 211
      Assigning: "file" = storage returned from "fopen(path, mode)".

            FILE* file = fopen(path, mode);

      /src/third_party/v8/src/platform-posix.cc, line: 214
      Resource "file" is not freed or pointed-to in "fileno".

            if (fstat(fileno(file), &file_stat) != 0) return NULL;

      /src/third_party/v8/src/platform-posix.cc, line: 214
      Variable "file" going out of scope leaks the storage it points to.

            if (fstat(fileno(file), &file_stat) != 0) return NULL;

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: