Merge "Remove interfaceChain from IServiceManager::add()" am: 2530c01a81 am: fcf61800c0
am: b924c14000

Change-Id: I8fc536dbc2d2d78fdb35648b06d2be2f955ee52f
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;
 }