diff --git a/db/pdfile.cpp b/db/pdfile.cpp index 418a94ca731..08649289d5a 100644 --- a/db/pdfile.cpp +++ b/db/pdfile.cpp @@ -1673,7 +1673,8 @@ namespace mongo { Client::invalidateDB( d->name ); Database::closeDatabase( d->name.c_str(), d->path ); - _deleteDataFiles( d->name.c_str() ); + d = 0; // d is now deleted + _deleteDataFiles( db.c_str() ); } typedef boost::filesystem::path Path;