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

Coverity analysis defect 76459: Resource leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.7.0
    • libbson
    • None

    Description

      Leak of memory or pointers to system resources

      Defect 76459 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /examples/bson-streaming-reader.c
      Function bson_streaming_remote_open
      /examples/bson-streaming-reader.c, line: 66
      "getaddrinfo" allocates memory that is stored into "server_list".
      /examples/bson-streaming-reader.c, line: 83
      Assigning: "ptr" = "server_list".
      /examples/bson-streaming-reader.c, line: 106
      Variable "server_list" going out of scope leaks the storage it points to.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: