Merge "Move configureRpcThreadpool into sources." am: 81f41a1ad2 am: 4549cb7dcc
am: 5868cad3ee

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