PPP, free input pbuf left in ppp_delete()

This commit is contained in:
Sylvain Rochet 2013-02-27 22:29:22 +01:00
parent bfe8c15a29
commit 58ffa8d526

View File

@ -613,6 +613,11 @@ int ppp_delete(ppp_pcb *pcb) {
}
#endif /* PPPOL2TP_SUPPORT */
#if PPPOS_SUPPORT
/* input pbuf left ? */
ppp_free_current_input_packet(&pcb->rx);
#endif /* PPPOS_SUPPORT */
memp_free(MEMP_PPP_PCB, pcb);
return 0;
}
@ -2020,6 +2025,9 @@ void ppp_link_terminated(ppp_pcb *pcb) {
#endif /* PPPOL2TP_SUPPORT */
{
#if PPPOS_SUPPORT
/* We cannot call ppp_free_current_input_packet() here because
* rx thread might still call pppos_input_proc()
*/
#if PPP_INPROC_OWNTHREAD
ppp_receive_wakeup(pcb);
#endif /* PPP_INPROC_OWNTHREAD */