Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67a4e4b4 authored by Chris Manton's avatar Chris Manton
Browse files

Properly release inquiry resources bta::dm::act

In addition to the memory contents, the info of being nullptr is used

Bug: 262654461
Test: gd/cert/run
Tag: #refactor

Change-Id: I1bc07daedcf270c56c86da6de503e6223464462e
parent b91254ac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -333,7 +333,7 @@ void BTA_dm_on_hw_off() {
  /* hw is ready, go on with BTA DM initialization */
  alarm_free(bta_dm_search_cb.search_timer);
  alarm_free(bta_dm_search_cb.gatt_close_timer);
  osi_free(bta_dm_search_cb.p_pending_search);
  osi_free_and_reset((void**)&bta_dm_search_cb.p_pending_search);
  fixed_queue_free(bta_dm_search_cb.pending_discovery_queue, osi_free);
  memset(&bta_dm_search_cb, 0, sizeof(bta_dm_search_cb));
}
@@ -354,7 +354,7 @@ void BTA_dm_on_hw_on() {
  /* hw is ready, go on with BTA DM initialization */
  alarm_free(bta_dm_search_cb.search_timer);
  alarm_free(bta_dm_search_cb.gatt_close_timer);
  osi_free(bta_dm_search_cb.p_pending_search);
  osi_free_and_reset((void**)&bta_dm_search_cb.p_pending_search);
  fixed_queue_free(bta_dm_search_cb.pending_discovery_queue, osi_free);
  memset(&bta_dm_search_cb, 0, sizeof(bta_dm_search_cb));
  /*