diff --git a/subsys/bluetooth/host/classic/sdp.c b/subsys/bluetooth/host/classic/sdp.c index 8e8255c35d2b0..a3a6fd78a5106 100644 --- a/subsys/bluetooth/host/classic/sdp.c +++ b/subsys/bluetooth/host/classic/sdp.c @@ -589,6 +589,7 @@ static uint16_t sdp_svc_search_req(struct bt_sdp *sdp, struct net_buf *buf, uint8_t cont_state_size, cont_state = 0U, idx = 0U, count = 0U; bool pkt_full = false; + memset(matching_recs, 0, sizeof(matching_recs)); res = find_services(buf, matching_recs); if (res) { /* Error in parsing */ @@ -1205,6 +1206,7 @@ static uint16_t sdp_svc_search_att_req(struct bt_sdp *sdp, struct net_buf *buf, uint8_t cont_state_size, next_svc = 0U, next_att = 0U; bool dry_run = false; + memset(matching_recs, 0, sizeof(matching_recs)); res = find_services(buf, matching_recs); if (res) { return res;