summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/drag_drop/drag_drop_controller.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 21510e7..4242264 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<ash::DragDropTracker> holder = drag_drop_tracker_.Pass();
}
} // namespace ash