Index: mojo/public/cpp/bindings/remote_ptr.h |
diff --git a/mojo/public/cpp/bindings/remote_ptr.h b/mojo/public/cpp/bindings/remote_ptr.h |
index 63ee719329544c2d314836fb2744770b522bca6c..9f7922615458316e89bc0cdd03fd9b16ffa12277 100644 |
--- a/mojo/public/cpp/bindings/remote_ptr.h |
+++ b/mojo/public/cpp/bindings/remote_ptr.h |
@@ -86,6 +86,7 @@ class RemotePtr { |
// Move-only constructor and operator=. |
RemotePtr(RValue other) : state_(other.object->release()) {} |
RemotePtr& operator=(RValue other) { |
+ delete state_; |
state_ = other.object->release(); |
return *this; |
} |