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:
Sylvain Rochet 2016-06-26 21:17:54 +02:00
parent 6fb074874b
commit b77fcef1a5

View File

@ -246,9 +246,7 @@ static err_t pppol2tp_destroy(ppp_pcb *ppp, void *ctx) {
LWIP_UNUSED_ARG(ppp);
sys_untimeout(pppol2tp_timeout, l2tp);
if (l2tp->udp != NULL) {
udp_remove(l2tp->udp);
}
udp_remove(l2tp->udp);
LWIP_MEMPOOL_FREE(PPPOL2TP_PCB, l2tp);
return ERR_OK;
}