[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Possible errors
From: |
Fabian Cenedese |
Subject: |
Re: [lwip-users] Possible errors |
Date: |
Thu, 07 Feb 2013 13:53:40 +0100 |
At 13:43 07.02.2013 +0100, Dipswitch wrote:
>Hi Fabi,
>
>I verified this in LwIP 1.4.1:
>
>Here the source included to have a better view at the problem. The one you
>named in IGMP however I don't see. Because line 801 here contains
>'IGMP_STATS_INC(igmp.memerr);'
That is also the problem:
struct igmp_msg* igmp = NULL;
p = pbuf_alloc(PBUF_TRANSPORT, IGMP_MINLEN, PBUF_RAM);
if (p) {
...
} else {
LWIP_DEBUGF(IGMP_DEBUG, ("igmp_send: not enough memory for igmp_send\n"));
IGMP_STATS_INC(igmp.memerr);
}
So igmp could still be NULL if p allocation fails and is used to
get igmp.memerr.
bye Fabi