diff --git a/db/queryutil.cpp b/db/queryutil.cpp index ac5b99eaba6..e8693df0d67 100644 --- a/db/queryutil.cpp +++ b/db/queryutil.cpp @@ -43,7 +43,7 @@ namespace mongo { return queryCache_[ ns ][ pattern ].second; } void registerIndexForPattern( const string &ns, const QueryPattern &pattern, const BSONObj &indexKey, int nScanned ) { - queryCache_[ ns ][ pattern ] = make_pair( indexKey.copy(), nScanned ); + queryCache_[ ns ][ pattern ] = make_pair( indexKey, nScanned ); } FieldBound::FieldBound( const BSONElement &e ) :