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

Memory leak in md5sumFile shell utility method (coverity auto-detected)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.10, 2.5.5
    • Component/s: Shell
    • Labels:
      None
    • Operating System:
      ALL

      Description

      Issue Status as of March 28, 2014

      ISSUE SUMMARY
      The md5sumFile shell utility method contains a bug that leaked memory due to not closing the file descriptor.

      USER IMPACT
      No server impact, but could potentially cause memory exhaustion on the client if repeated often enough.

      SOLUTION
      Close the file handle when the file cannot be opened before exiting the block.

      WORKAROUNDS
      None

      AFFECTED VERSIONS
      All recent production releases up to version 2.4.9 are affected.

      PATCHES
      The fix is included in the 2.4.10 production release and the 2.5.5 development release, which will evolve into the 2.6.0 production release.

      Original Description

      A new defect has been detected and assigned to sverch in Coverity Connect http://coverity.mongodb.com//sourcebrowser.htm?projectId=10001#mergedDefectId=10177
      The defect was flagged by checker RESOURCE_LEAK in
      file /src/mongo/shell/shell_utils_extended.cpp
      function mongo::shell_utils::md5sumFile(const mongo::BSONObj &, void *)
      and this ticket was created by matt.kangas@10gen.com

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: