mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 15:42:56 +00:00
bridgeif_input: check netif != NULL before calling netif_get_client_data()
This commit is contained in:
parent
ca9f57c09f
commit
5d600f72d2
@ -481,9 +481,13 @@ bridgeif_input(struct pbuf *p, struct netif *netif)
|
||||
bridgeif_portmask_t dstports;
|
||||
struct eth_addr *src, *dst;
|
||||
bridgeif_private_t *br;
|
||||
bridgeif_port_t *port = (bridgeif_port_t *)netif_get_client_data(netif, bridgeif_netif_client_id);
|
||||
bridgeif_port_t *port;
|
||||
if (p == NULL || netif == NULL) {
|
||||
return ERR_VAL;
|
||||
}
|
||||
port = (bridgeif_port_t *)netif_get_client_data(netif, bridgeif_netif_client_id);
|
||||
LWIP_ASSERT("port data not set", port != NULL);
|
||||
if (p == NULL || netif == NULL || port == NULL || port->bridge == NULL) {
|
||||
if (port == NULL || port->bridge == NULL) {
|
||||
return ERR_VAL;
|
||||
}
|
||||
br = (bridgeif_private_t *)port->bridge;
|
||||
|
Loading…
Reference in New Issue
Block a user