buglwIP - A Lightweight TCP/IP stack - Bugs: bug #29068, memory leak in the ping demo...

 
 

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

bug #29068: memory leak in the ping demo application

Submitted by:  Iordan Neshev <iordan_neshev>
Submitted on:  Thu 04 Mar 2010 10:48:46 AM UTC  
 
Category: ContribSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Thu 04 Mar 2010 03:50:15 PM UTC, comment #1:

Fixed, thanks for reporting. This is no problem for PING_USE_SOCKETS==1.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 04 Mar 2010 10:48:46 AM UTC, original submission:

The pbuf of the incoming packet is not freed.
After MEMP_NUM_PBUF pings the pool is depleted.

static u8_t ping_recv( ... )
{
if (pbuf_header( p, -PBUF_IP_HLEN)==0)
{
......
{
/* do some ping result processing */
PING_RESULT(1);
}
}

// ---> this is missing
if (p != NULL) {
pbuf_free(p)
}
// <---
}

I tested this for NO_SYS = 1;
I guess the same should be done in ping_recv for the NO_SYS==0 case.

Also, #include <string.h> should be added to define size_t

Iordan Neshev <iordan_neshev>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by iordan_neshev (Submitted the item)
  •  

    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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 04 Mar 2010 03:50:15 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1