Coverity analysis defect 101516: Resource leak

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.7.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              Hannes Magnusson (Inactive)
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: