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

Replace bare malloc calls with bson_malloc

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 1.25.0
    • None
    • None

    Description

      There are a few places in the C driver source code where we call `malloc` directly instead of the `bson_malloc` wrapper. We need to replace all of these calls with the `bson_malloc` wrapper. Calls to malloc can be found as follows:

       

      ~/src/mongo-c-driver$ grep -rn "\<malloc (" * 2> /dev/null

       

      Please be sure to replace all of the allocation functions with their appropriate `bson_*` counterpart, i.e.,

      • free => bson_free
      • malloc => bson_malloc
      • calloc => bson_malloc0
      • realloc => bson_realloc

      Attachments

        Activity

          People

            roberto.sanchez@mongodb.com Roberto Sanchez
            kyle.kloberdanz@mongodb.com Kyle Kloberdanz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: