Skip to content

Commit 5681209

Browse files
committed
fix(mdns): Fix null pointer exception in mdns_parse_packet
1 parent c413fa7 commit 5681209

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/mdns/mdns_receive.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,10 @@ static void remove_parsed_question(mdns_parsed_packet_t *parsed_packet, uint16_t
554554
{
555555
mdns_parsed_question_t *q = parsed_packet->questions;
556556

557+
if (!q) {
558+
return;
559+
}
560+
557561
if (question_matches(q, type, service)) {
558562
parsed_packet->questions = q->next;
559563
mdns_mem_free(q->host);

0 commit comments

Comments
 (0)