mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
mdns: fix memory leak in pbuf if tcpipadapter failed to get netif
This commit is contained in:
parent
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];
|
||||
esp_err_t err = tcpip_adapter_get_netif(msg->tcpip_if, &nif);
|
||||
if (err) {
|
||||
pbuf_free(msg->pbt);
|
||||
msg->err = err;
|
||||
return err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user