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

Coverity analysis defect 101516: Resource leak

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

      Leak of memory or pointers to system resources

      Defect 101516 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /src/mongoc/mongoc-rpc.c
      Function _mongoc_rpc_compress
      /src/mongoc/mongoc-rpc.c, line: 676
      Assigning: "output" = storage returned from "bson_malloc0(output_length)".

             output = (char *) bson_malloc0 (output_length);
      

      /src/mongoc/mongoc-rpc.c, line: 703
      Variable "output" going out of scope leaks the storage it points to.

             return NULL;
      

            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: