lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #29068] memory leak in the ping demo application


From: Iordan Neshev
Subject: [lwip-devel] [bug #29068] memory leak in the ping demo application
Date: Thu, 04 Mar 2010 10:48:46 +0000
User-agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.00

URL:
  <http://savannah.nongnu.org/bugs/?29068>

                 Summary: memory leak in the ping demo application
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: iordan_neshev
            Submitted on: Thu 04 Mar 2010 10:48:46 AM GMT
                Category: Contrib
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head

    _______________________________________________________

Details:

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




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?29068>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]