Merge "wifi Clear the callbacks before executing terminate"
diff --git a/hostapd/hidl/1.3/hostapd.cpp b/hostapd/hidl/1.3/hostapd.cpp
index ad0c0f2..274a079 100644
--- a/hostapd/hidl/1.3/hostapd.cpp
+++ b/hostapd/hidl/1.3/hostapd.cpp
@@ -658,6 +658,9 @@
 Return<void> Hostapd::terminate()
 {
 	wpa_printf(MSG_INFO, "Terminating...");
+	// Clear the callback to avoid IPCThreadState shutdown during the
+	// callback event.
+	callbacks_.clear();
 	eloop_terminate();
 	return Void();
 }