[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] PPP Memory Leak
From: |
narke |
Subject: |
[lwip-devel] PPP Memory Leak |
Date: |
Wed, 15 Feb 2012 11:29:25 +0800 |
Hi, List
I found the bug in practice. Before I call pppSigHUP, there might be
some un-concluded frame accumulated in ppp, thus a pbuf might be
allocated but not yet freed. This un-concluded frame might be an
incorrect PPP frame. After I call the pppSigHUP, the allocated pbuf
stay in ppp as allocated state. The detail you can refer to the
pppInProc() function. Then next time, when I have to reopen the ppp,
I can only call the pppOverSerialOpen() function, but this function
will reset ppp receive parser state variables, that results in the
allocated pbuf will never get chance to be freed.
I am not sure this bug was reported or not. Currently, my workaround
solution is to feed the ppp with a 0x7e character before I can
pppSigHUP. This extra ppp ending flag cause the pppInProc() state
machine check the un-concluded frame and release it.
--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer
narke
public key at http://subkeys.pgp.net:11371 (address@hidden)
- [lwip-devel] PPP Memory Leak,
narke <=