summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinit Deshpande <vinitd@google.com>2015-07-30 19:27:56 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-30 19:27:56 +0000
commit9bf2ea6c799c1fb502e91e2c592f257c9a1814e1 (patch)
tree6630ef149a9b22d861f3cbeb38d19fec35e75b68
parent47b8cdab4aca1a4675eafe65e8fc6e1383d41ed7 (diff)
parent6d9f23bf01b35074e29c6319c4009a1295cb4aa6 (diff)
downloadhardware_broadcom_wlan-9bf2ea6c799c1fb502e91e2c592f257c9a1814e1.zip
hardware_broadcom_wlan-9bf2ea6c799c1fb502e91e2c592f257c9a1814e1.tar.gz
hardware_broadcom_wlan-9bf2ea6c799c1fb502e91e2c592f257c9a1814e1.tar.bz2
am 6d9f23bf: Fix a potential crash in debugging code
* commit '6d9f23bf01b35074e29c6319c4009a1295cb4aa6': Fix a potential crash in debugging code
-rw-r--r--bcmdhd/wifi_hal/wifi_hal.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/bcmdhd/wifi_hal/wifi_hal.cpp b/bcmdhd/wifi_hal/wifi_hal.cpp
index 0a6384f..b27bac2 100644
--- a/bcmdhd/wifi_hal/wifi_hal.cpp
+++ b/bcmdhd/wifi_hal/wifi_hal.cpp
@@ -295,6 +295,12 @@ void wifi_cleanup(wifi_handle handle, wifi_cleaned_up_handler handler)
int bad_commands = 0;
+ for (int i = 0; i < info->num_event_cb; i++) {
+ cb_info *cbi = &(info->event_cb[i]);
+ WifiCommand *cmd = (WifiCommand *)cbi->cb_arg;
+ ALOGE("Command left in event_cb %p:%s", cmd, cmd->getType());
+ }
+
while (info->num_cmd > bad_commands) {
int num_cmd = info->num_cmd;
cmd_info *cmdi = &(info->cmd[bad_commands]);
@@ -316,7 +322,7 @@ void wifi_cleanup(wifi_handle handle, wifi_cleaned_up_handler handler)
for (int i = 0; i < info->num_event_cb; i++) {
cb_info *cbi = &(info->event_cb[i]);
WifiCommand *cmd = (WifiCommand *)cbi->cb_arg;
- ALOGE("Leaked command %p:%s", cmd, cmd->getType());
+ ALOGE("Leaked command %p", cmd);
}
pthread_mutex_unlock(&info->cb_lock);