summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-01-02 20:30:15 -0500
committerEliot Horowitz <eliot@10gen.com>2011-01-02 20:30:15 -0500
commit5cfe1eb716e35f6b0815ac346e168750d0868d63 (patch)
tree9fce4f80f71e4cd1fedff3f89340e7da24ebff78
parent5ab2e7d77a54a05b3df4c4936511fec9b9d09795 (diff)
downloadmongo-5cfe1eb716e35f6b0815ac346e168750d0868d63.tar.gz
release ClientCursor in removeRange since sometimes the cursor itself is deleted SERVER-2319
-rw-r--r--db/dbhelpers.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/db/dbhelpers.cpp b/db/dbhelpers.cpp
index 205787e16c4..2d5b378ecb3 100644
--- a/db/dbhelpers.cpp
+++ b/db/dbhelpers.cpp
@@ -303,6 +303,7 @@ namespace mongo {
if ( yield && ! cc->yieldSometimes() ){
// cursor got finished by someone else, so we're done
+ cc.release(); // if the collection/db is dropped, cc may be deleted
break;
}
}