Free our input mbuf when the FCS is good (oops, memory leak).

This commit is contained in:
brian 1998-01-14 01:47:50 +00:00
parent 07d18a334d
commit f2896d69aa

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id$ * $Id: pred.c,v 1.19 1997/12/21 12:11:08 brian Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -279,6 +279,7 @@ Pred1Input(u_short *proto, struct mbuf *bp)
wp->cnt -= 2; wp->cnt -= 2;
*proto = (*proto << 8) | *pp++; *proto = (*proto << 8) | *pp++;
} }
pfree(bp);
return wp; return wp;
} else { } else {
LogDumpBp(LogHDLC, "Bad FCS", wp); LogDumpBp(LogHDLC, "Bad FCS", wp);