Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-920

Coverity analysis defect 72656: Resource leak

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.3.0-beta0
    • None
    • None
    • None

    Description

      Leak of memory or pointers to system resources

      Defect 72656 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /src/mongoc/mongoc-gridfs.c
      Function _mongoc_gridfs_new
      /src/mongoc/mongoc-gridfs.c, line: 116
      Assigning: "gridfs" = storage returned from "bson_malloc0(24UL)".

             gridfs = (mongoc_gridfs_t *) bson_malloc0 (sizeof *gridfs);

      /src/mongoc/mongoc-gridfs.c, line: 128
      Variable "gridfs" going out of scope leaks the storage it points to.

             if (!r) { return NULL; }

      Attachments

        Activity

          People

            kyle.suarez@mongodb.com Kyle Suarez
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: