diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc index 21510e7f5344ed..42422644930170 100644 --- a/ash/drag_drop/drag_drop_controller.cc +++ b/ash/drag_drop/drag_drop_controller.cc @@ -557,9 +557,9 @@ void DragDropController::Cleanup() { drag_window_->RemoveObserver(this); drag_window_ = NULL; drag_data_ = NULL; - // Cleanup can be called again while deleting DragDropTracker, so use Pass - // instead of reset to avoid double free. - drag_drop_tracker_.Pass(); + // Cleanup can be called again while deleting DragDropTracker, so delete + // the pointer with a local variable to avoid double free. + scoped_ptr holder = drag_drop_tracker_.Pass(); } } // namespace ash