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

Potential memory leak in ConnectionString::connect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-rc1
    • Fix Version/s: 3.0.4, 3.1.4
    • Component/s: Internal Client
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      Platform 4 06/05/15
    • Linked BF Score:
      0

      Description

      For example in the case of normal connections:

      case MASTER: {
          DBClientConnection * c = new DBClientConnection(true);
          c->setSoTimeout( socketTimeout );
          log(1) << "creating new connection to:" << _servers[0] << endl;
          if ( ! c->connect( _servers[0] , errmsg ) ) { // <------ This can throw an assertion and c will never be cleaned!!!
              delete c;
              return 0;
          }
          log(1) << "connected connection!" << endl;
          return c;
      }

      We should also check whether the other cases have the same issue.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: