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

Coverity analysis defect 72656: Resource leak

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0-beta0
    • Affects Version/s: None
    • Component/s: None
    • None

      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; }
      

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

              Created:
              Updated:
              Resolved: