kopia lustrzana https://github.com/espressif/esp-idf
mdns: fix memory leak in pbuf if tcpipadapter failed to get netif
rodzic
fbef5297fc
commit
8462751f95
|
@ -301,6 +301,7 @@ static err_t _mdns_udp_pcb_write_api(struct tcpip_api_call_data *api_call_msg)
|
||||||
mdns_pcb_t * _pcb = &_mdns_server->interfaces[msg->tcpip_if].pcbs[msg->ip_protocol];
|
mdns_pcb_t * _pcb = &_mdns_server->interfaces[msg->tcpip_if].pcbs[msg->ip_protocol];
|
||||||
esp_err_t err = tcpip_adapter_get_netif(msg->tcpip_if, &nif);
|
esp_err_t err = tcpip_adapter_get_netif(msg->tcpip_if, &nif);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
pbuf_free(msg->pbt);
|
||||||
msg->err = err;
|
msg->err = err;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue