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

Coverity analysis defect 76459: Resource leak

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.0
    • Affects Version/s: None
    • Component/s: libbson
    • None

      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.

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

              Created:
              Updated:
              Resolved: