Unlikely leak converting corrupt BSON to JSON

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Trivial - P5
    • 1.10.0
    • Affects Version/s: None
    • Component/s: json
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Leak of memory or pointers to system resources

      Defect 101866 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /src/bson/bson.c
      Function _bson_as_json_visit_document
      /src/bson/bson.c, line: 3039
      Assigning: "child_state.str" = storage returned from "bson_string_new("{ ")".

                child_state.str = bson_string_new ("{ ");
      

      /src/bson/bson.c, line: 3043
      Variable "child_state" going out of scope leaks the storage "child_state.str" points to.

                   return true;
      

              Assignee:
              A. Jesse Jiryu Davis
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: