mdns: fix memory leak in pbuf if tcpipadapter failed to get netif

This commit is contained in:
David Cermak 2019-02-15 15:59:11 +01:00 committed by bot
parent 3802fddefb
commit 113e829552

View File

@ -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;
}