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

Coverity analysis defect 101971: Resource leak

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 1.8.0
    • None
    • None
    • None

    Description

      Leak of memory or pointers to system resources

      Defect 101971 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /src/mongoc/mongoc-client.c
      Function mongoc_client_kill_cursor
      /src/mongoc/mongoc-client.c, line: 1840
      Assigning: "read_prefs" = storage returned from "mongoc_read_prefs_new(MONGOC_READ_PRIMARY)".

             read_prefs = mongoc_read_prefs_new (MONGOC_READ_PRIMARY);

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

                return;

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: