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

Coverity analysis defect 112101: Double free

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.10
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Fully Compatible
    • ALL
    • Security 2019-03-25

      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);
      

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

              Created:
              Updated:
              Resolved: