From 4077422ae2d7e3214f85c1f276f098e4822a6185 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Thu, 7 Jun 2012 20:41:21 +0200 Subject: [PATCH] fixed pbuf leaks in ppp_input() in case of packets not expected --- src/netif/ppp/ppp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 9df70260..0482e845 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -746,7 +746,7 @@ static void ppp_input(void *arg) { */ if (protocol != PPP_LCP && lcp_fsm[0].state != OPENED) { dbglog("Discarded non-LCP packet when LCP not open"); - return; + goto drop; } /* FIXME: add a phase per connection */ @@ -772,7 +772,7 @@ static void ppp_input(void *arg) { )) { dbglog("discarding proto 0x%x in phase %d", protocol, phase); - return; + goto drop; } /* FIXME: should we write protent to do that ? */