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

Commit 64516cfe authored by Kausik Sinnaswamy's avatar Kausik Sinnaswamy Committed by Android Git Automerger
Browse files

am b63a293f: am e587fb31: Fix for SDP data structure leak during pairing

* commit 'b63a293f':
  Fix for SDP data structure leak during pairing
parents 5ff86897 b63a293f
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -586,12 +586,20 @@ static void search_services_copy_cb(UINT16 event, char *p_dest, char *p_src)
    {
         case BTA_DM_DISC_RES_EVT:
         {
              if ((p_src_data->disc_res.result == BTA_SUCCESS) &&
                  (p_src_data->disc_res.num_uuids > 0))
              if (p_src_data->disc_res.result == BTA_SUCCESS)
              {
                  p_dest_data->disc_res.p_uuid_list = (UINT8*)(p_dest + sizeof(tBTA_DM_SEARCH));
                  if (p_src_data->disc_res.num_uuids > 0)
                  {
                       p_dest_data->disc_res.p_uuid_list =
                                                        (UINT8*)(p_dest + sizeof(tBTA_DM_SEARCH));
                       memcpy(p_dest_data->disc_res.p_uuid_list, p_src_data->disc_res.p_uuid_list,
                              p_src_data->disc_res.num_uuids*MAX_UUID_SIZE);
                       GKI_freebuf(p_src_data->disc_res.p_uuid_list);
                  }
                  if (p_src_data->disc_res.p_raw_data != NULL)
                  {
                      GKI_freebuf(p_src_data->disc_res.p_raw_data);
                  }
              }
         } break;
    }