mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 23:52:51 +00:00
PPP, L2TP: remove unnecessary l2tp->udp null check
l2tp->udp can't be null here, pppol2tp_create returns a NULL L2TP PCB if UDP PCB failed to be created. Remove useless null check.
This commit is contained in:
parent
6fb074874b
commit
b77fcef1a5
@ -246,9 +246,7 @@ static err_t pppol2tp_destroy(ppp_pcb *ppp, void *ctx) {
|
|||||||
LWIP_UNUSED_ARG(ppp);
|
LWIP_UNUSED_ARG(ppp);
|
||||||
|
|
||||||
sys_untimeout(pppol2tp_timeout, l2tp);
|
sys_untimeout(pppol2tp_timeout, l2tp);
|
||||||
if (l2tp->udp != NULL) {
|
|
||||||
udp_remove(l2tp->udp);
|
udp_remove(l2tp->udp);
|
||||||
}
|
|
||||||
LWIP_MEMPOOL_FREE(PPPOL2TP_PCB, l2tp);
|
LWIP_MEMPOOL_FREE(PPPOL2TP_PCB, l2tp);
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user