mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-28 14:54:05 +00:00
mdns.c: Fix accessing potentially uninitialized variable
myprobe_inpkt.pbuf may not be set to NULL in mdns_handle_probe_tiebreaking()
This commit is contained in:
parent
45a055840d
commit
e31f1b918c
@ -834,6 +834,7 @@ mdns_handle_probe_tiebreaking(struct netif *netif, struct mdns_packet *pkt)
|
||||
*/
|
||||
mdns_define_probe_rrs_to_send(netif, &myprobe_msg);
|
||||
memset(&myprobe_outpkt, 0, sizeof(myprobe_outpkt));
|
||||
memset(&myprobe_inpkt, 0, sizeof(myprobe_inpkt));
|
||||
res = mdns_create_outpacket(netif, &myprobe_msg, &myprobe_outpkt);
|
||||
if (res != ERR_OK) {
|
||||
goto cleanup;
|
||||
@ -1017,9 +1018,8 @@ mdns_handle_probe_tiebreaking(struct netif *netif, struct mdns_packet *pkt)
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (myprobe_inpkt.pbuf) {
|
||||
if (myprobe_inpkt.pbuf != NULL) {
|
||||
pbuf_free(myprobe_inpkt.pbuf);
|
||||
myprobe_inpkt.pbuf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user