Skip to content

Commit f7a01e3

Browse files
committed
Bluetooth: SDP: fix sdp record not uninitialized
Signed-off-by: Kai Cheng <[email protected]>
1 parent 1f4e78e commit f7a01e3

File tree

1 file changed

+2
-0
lines changed
  • subsys/bluetooth/host/classic

1 file changed

+2
-0
lines changed

subsys/bluetooth/host/classic/sdp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ static uint16_t sdp_svc_search_req(struct bt_sdp *sdp, struct net_buf *buf,
589589
uint8_t cont_state_size, cont_state = 0U, idx = 0U, count = 0U;
590590
bool pkt_full = false;
591591

592+
memset(matching_recs, 0, sizeof(matching_recs));
592593
res = find_services(buf, matching_recs);
593594
if (res) {
594595
/* Error in parsing */
@@ -1205,6 +1206,7 @@ static uint16_t sdp_svc_search_att_req(struct bt_sdp *sdp, struct net_buf *buf,
12051206
uint8_t cont_state_size, next_svc = 0U, next_att = 0U;
12061207
bool dry_run = false;
12071208

1209+
memset(matching_recs, 0, sizeof(matching_recs));
12081210
res = find_services(buf, matching_recs);
12091211
if (res) {
12101212
return res;

0 commit comments

Comments
 (0)