mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
Fixed bug #27078: Possible memory leak in pppInit()
This commit is contained in:
parent
8bf57c0e14
commit
e7d5739ce7
@ -25,6 +25,9 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2009-08-23 Simon Goldschmidt
|
||||
* ppp.c: bug #27078: Possible memory leak in pppInit()
|
||||
|
||||
2009-08-23 Simon Goldschmidt
|
||||
* netdb.c, dns.c: bug #26657: DNS, if host name is "localhost", result
|
||||
is error.
|
||||
|
@ -395,13 +395,17 @@ pppInit(void)
|
||||
|
||||
magicInit();
|
||||
|
||||
subnetMask = htonl(0xffffff00);
|
||||
|
||||
for (i = 0; i < NUM_PPP; i++) {
|
||||
pppControl[i].openFlag = 0;
|
||||
|
||||
subnetMask = htonl(0xffffff00);
|
||||
|
||||
outpacket_buf[i] = (u_char *)mem_malloc(PPP_MRU+PPP_HDRLEN);
|
||||
if(!outpacket_buf[i]) {
|
||||
if (!outpacket_buf[i]) {
|
||||
for (j = 0; j < i; j++) {
|
||||
/* deallocate all preceding buffers */
|
||||
mem_free(outpacket_buf[j]);
|
||||
}
|
||||
return ERR_MEM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user