summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2012-12-28 15:05:28 -0500
committerKristina <kristina@10gen.com>2012-12-28 15:05:28 -0500
commit9e4c23bb48d70dbf158ea79f3cc1500c35fa555d (patch)
tree80f18fc91410e8642aa7c6c08f06c8e104d8de49 /src/mongo
parent56944b0240ae4bce795e728f5decd21f2b09be88 (diff)
downloadmongo-9e4c23bb48d70dbf158ea79f3cc1500c35fa555d.tar.gz
SERVER-8044 Client destructor should clean up all associated curops
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/client.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/client.cpp b/src/mongo/db/client.cpp
index 3956ae00480..e9a3ff04396 100644
--- a/src/mongo/db/client.cpp
+++ b/src/mongo/db/client.cpp
@@ -170,13 +170,19 @@ namespace mongo {
if ( ! _shutdown )
clients.erase(this);
}
- delete _curOp;
+
+ CurOp* last;
+ do {
+ last = _curOp;
+ delete _curOp;
+ // _curOp may have been reset to _curOp->_wrapped
+ } while (_curOp != last);
}
}
bool Client::shutdown() {
#if defined(_DEBUG)
- {
+ {
if( sizeof(void*) == 8 ) {
StackChecker::check( desc().c_str() );
}