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

Coverity analysis defect 72658: Resource leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • 1.3.0-beta0
    • None
    • None

    Description

      Leak of memory or pointers to system resources

      Defect 72658 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /src/mongoc/mongoc-database.c
      Function _mongoc_database_find_collections_legacy
      /src/mongoc/mongoc-database.c, line: 708
      Assigning: "ctx" = storage returned from "bson_malloc(24UL)".

             ctx = (mongoc_database_find_collections_legacy_ctx_t *)bson_malloc (sizeof (*ctx));

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

             return cursor;

      Attachments

        Activity

          People

            bjori Hannes Magnusson
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: