buglwIP - A Lightweight TCP/IP stack - Bugs: bug #16165, pbuf alloced in ethernetif_output...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #16165: pbuf alloced in ethernetif_output without pbuf_free

Submitted by:  None
Submitted on:  Thu 23 Mar 2006 07:17:06 AM UTC  
 
Category: pbufsSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Tue 04 Apr 2006 08:17:01 AM UTC, comment #1:

The mentioned pbuf_alloc() doesn't come from our current (STABLE-1_1_1) source (lwip/src/netif/ethernetif.c). Please update or complain elsewhere (e.g. with the ucos port maintainer).

Christiaan Simons <christiaans>
Project Member
Thu 23 Mar 2006 07:17:06 AM UTC, original submission:

In the ethernetif.c given out for exsimple, there's code like this:
if(pbuf_header(p, 14) != 0) {
/* The pbuf_header() call shouldn't fail, but we allocate an extra
pbuf just in case. */
q = pbuf_alloc(PBUF_LINK, 14, PBUF_RAM);
If PBUF_LINK_HLEN is set too small, the pbuf_header do fail,and puf_alloc will make a new pbuf in memory pool. but there's no pbuf_free after the low_level_output!
This will case the pbuf_free that in udp_send fail ,and the puf for udp and ip header is not free correctly!
In the source I download form a port to ucos, PBUF_LINK_HLEN in opt.h is set to 0 by some body, memmory is used up after 26 udp send!
To serve this,set the q to null at the start of ethernetif_output, and add a pbuf_free(q) after the low_level_output.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 04 Apr 2006 08:17:01 AM UTCchristiaansStatusNone=>Invalid
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1