commit | 2dc7d6a2c72a66a9548f8c4f2bf85582e42ad42a | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Mon Nov 26 19:12:17 2018 -0800 |
committer | android-build-merger <android-build-merger@google.com> | Mon Nov 26 19:12:17 2018 -0800 |
tree | 55dfe012c3fd1a6b75cac85e13c8babb15c0ae0f | |
parent | 2efcefd3c2da70387dd63ee47195be2dcaaf345d [diff] | |
parent | c052bd68314e1c3f9b2e73a52d301301014c204a [diff] |
Merge "Fix double-freeing of ScopedAResource" am: 3367b1e708 am: cd0f22bc59 am: c052bd6831 Change-Id: I207d3463f90e5ff5a78c976f98e301d0dd852ed0
diff --git a/libs/binder/ndk/include_ndk/android/binder_auto_utils.h b/libs/binder/ndk/include_ndk/android/binder_auto_utils.h index e2c0cfa..c6fcaa4 100644 --- a/libs/binder/ndk/include_ndk/android/binder_auto_utils.h +++ b/libs/binder/ndk/include_ndk/android/binder_auto_utils.h
@@ -163,7 +163,9 @@ ScopedAResource& operator=(ScopedAResource&&) = delete; // move-constructing is okay - ScopedAResource(ScopedAResource&&) = default; + ScopedAResource(ScopedAResource&& other) : mT(std::move(other.mT)) { + other.mT = DEFAULT; + } private: T mT;