summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-02-18 19:38:43 +0000
committerbrian <brian@FreeBSD.org>1998-02-18 19:38:43 +0000
commit4d644306f07da96f400524d47b8d97a494be1eb7 (patch)
treefbffbca882e5effbd12eba80024e2508d2f00896
parentf7fa94dfb28a00707e7913ed2aea6a8b475b5ef1 (diff)
downloadFreeBSD-src-4d644306f07da96f400524d47b8d97a494be1eb7.zip
FreeBSD-src-4d644306f07da96f400524d47b8d97a494be1eb7.tar.gz
Don't leak memory when the peer sends PROTO_COMPD packets
without negotiating compression first.
-rw-r--r--usr.sbin/ppp/ccp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index 5dfd941..9b5de4b 100644
--- a/usr.sbin/ppp/ccp.c
+++ b/usr.sbin/ppp/ccp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ccp.c,v 1.29 1998/01/20 22:47:34 brian Exp $
+ * $Id: ccp.c,v 1.30 1998/01/21 02:15:10 brian Exp $
*
* TODO:
* o Support other compression protocols
@@ -418,9 +418,9 @@ CompdInput(u_short *proto, struct mbuf *m)
/* Send another REQ and put the packet in the bit bucket */
LogPrintf(LogCCP, "ReSendResetReq(%d)\n", CcpInfo.reset_sent);
FsmOutput(&CcpFsm, CODE_RESETREQ, CcpInfo.reset_sent, NULL, 0);
- pfree(m);
} else if (in_algorithm >= 0 && in_algorithm < NALGORITHMS)
return (*algorithm[in_algorithm]->i.Read)(proto, m);
+ pfree(m);
return NULL;
}
OpenPOWER on IntegriCloud