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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.10, 2.5.5
    • Affects Version/s: None
    • Component/s: Shell
    • None
    • ALL

      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

            Assignee:
            sverch Shaun Verch
            Reporter:
            auto auto
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: