diff options
author | Kristina <kristina@10gen.com> | 2012-12-28 15:05:28 -0500 |
---|---|---|
committer | Kristina <kristina@10gen.com> | 2012-12-28 15:05:28 -0500 |
commit | 9e4c23bb48d70dbf158ea79f3cc1500c35fa555d (patch) | |
tree | 80f18fc91410e8642aa7c6c08f06c8e104d8de49 /src/mongo | |
parent | 56944b0240ae4bce795e728f5decd21f2b09be88 (diff) | |
download | mongo-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.cpp | 10 |
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() ); } |