Merge "Allow MQDescriptors with null native_handles to be passed over hwbinder" am: 499f210f05 am: a301e8d0e8
am: 651b296222

Change-Id: Ic0c6a70bcff8168d66a978504607cd6b217d9103
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp
index 547f7e7..bacb3d4 100644
--- a/base/HidlSupport.cpp
+++ b/base/HidlSupport.cpp
@@ -151,6 +151,7 @@
 }
 
 void hidl_handle::setTo(native_handle_t* handle, bool shouldOwn) {
+    freeHandle();
     mHandle = handle;
     mOwnsHandle = shouldOwn;
 }