Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40142

Coverity analysis defect 112101: Double free

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.10
    • None
    • Internal Code
    • Fully Compatible
    • ALL
    • Security 2019-03-25

    Description

      Memory is deallocated more than once

      Defect 112101 (STATIC_C)
      Checker USE_AFTER_FREE (subcategory double_free)
      File: /src/mongo/db/ftdc/block_compressor.cpp
      Function mongo::BlockCompressor::compress(mongo::ConstDataRange)
      /src/mongo/db/ftdc/block_compressor.cpp, line: 67
      "deflateEnd" frees "stream.state". [Note: The source code implementation of the function has been overridden by a builtin model.]

                  (void)deflateEnd(&stream);

      /src/mongo/db/ftdc/block_compressor.cpp, line: 74
      Calling "deflateEnd" frees pointer "stream.state" which has already been freed. [Note: The source code implementation of the function has been overridden by a builtin model.]

              err = deflateEnd(&stream);

      Attachments

        Activity

          People

            mark.benvenuto@mongodb.com Mark Benvenuto
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: