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

examples leaking memory in most cases

    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Most examples in src/libmongoc/examples (e.g. examples/find-and-modify.c) exit before freeing initialized variables in the case of failure. A select few other examples (e.g. examples/example-session.c and examples/basic_aggregation/basic-aggregation.c) use a goto label and free all memory before exiting.

      Should all examples be adapted to use a goto label? This would likely require quite a bit of refactoring for the ~20-25 examples in the directory that don't use a label.

            Assignee:
            Unassigned Unassigned
            Reporter:
            evgeni.dobranov@mongodb.com Evgeni Dobranov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: