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

Coverity analysis defect 101971: Resource leak

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • None

      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;
      

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

              Created:
              Updated:
              Resolved: