diff options
author | Eliot Horowitz <eliot@10gen.com> | 2012-01-24 01:00:02 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2012-02-04 01:09:34 -0500 |
commit | 5fc7c288e05ef7109e60f08196bd06b4a9ae3ef1 (patch) | |
tree | 9e62f7c77fc2ba788488862e3d6ed621a103e836 | |
parent | 5c71438495f75c3de4a2f8f8eeb16f226c2f9563 (diff) | |
download | mongo-5fc7c288e05ef7109e60f08196bd06b4a9ae3ef1.tar.gz |
fix segfault in mongos with some replica set changes
-rw-r--r-- | client/dbclient_rs.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/client/dbclient_rs.cpp b/client/dbclient_rs.cpp index dccaf571a4f..0189700db02 100644 --- a/client/dbclient_rs.cpp +++ b/client/dbclient_rs.cpp @@ -446,8 +446,6 @@ namespace mongo { } catch( DBException& e ){ warning() << "cannot connect to new host " << *i << " to replica set " << this->_name << causedBy( e ) << endl; - delete newConn; - newConn = NULL; } _nodes.push_back( Node( h , newConn ) ); @@ -458,6 +456,7 @@ namespace mongo { bool ReplicaSetMonitor::_checkConnection( DBClientConnection * c , string& maybePrimary , bool verbose , int nodesOffset ) { + assert( c ); scoped_lock lk( _checkConnectionLock ); bool isMaster = false; bool changed = false; |