summaryrefslogtreecommitdiff
path: root/base/HidlSupport.cpp
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-02-17 11:58:08 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-02-17 11:58:08 +0000
commitb2c5b69d1d12f0c1b7381ebaa6d57adea5ee8e12 (patch)
tree5600167a15bb1a511d349fab2bc2d31b69592521 /base/HidlSupport.cpp
parent0e3ea8cd1556c5907938c6e50b0323dff1cb0077 (diff)
parentca37c0effc558ffe93a3c66f0b6b2480ec7410d4 (diff)
downloadlibhidl-b2c5b69d1d12f0c1b7381ebaa6d57adea5ee8e12.tar.gz
Merge "Add missing freeHandle to setTo"
Diffstat (limited to 'base/HidlSupport.cpp')
-rw-r--r--base/HidlSupport.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp
index 1544969..dd93534 100644
--- a/base/HidlSupport.cpp
+++ b/base/HidlSupport.cpp
@@ -147,6 +147,7 @@ hidl_handle &hidl_handle::operator=(hidl_handle &&other) {
}
void hidl_handle::setTo(native_handle_t* handle, bool shouldOwn) {
+ freeHandle();
mHandle = handle;
mOwnsHandle = shouldOwn;
}