Skip to content

Commit bf724ef

Browse files
committed
SERVER-6709 Don't call ->done() on a null ptr
1 parent 2069338 commit bf724ef

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/mongo/s/client_info.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,12 @@ namespace mongo {
247247
}
248248
catch( std::exception &e ){
249249

250-
// Safe to return here, since we haven't started any extra processing yet, just collecting
251-
// responses.
250+
// Safe to return here, since we haven't started any extra processing yet, just collecting
251+
// responses.
252252

253-
warning() << "could not get last error from a shard " << theShard << causedBy( e ) << endl;
254-
conn->done();
253+
warning() << "could not get last error from a shard " << theShard << causedBy( e ) << endl;
254+
if (conn)
255+
conn->done();
255256

256257
return false;
257258
}

0 commit comments

Comments
 (0)