[Top][All Lists]

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

Re: [lwip-users] to free or not to free (pbuf_free in tcp_recv)

From: address@hidden
Subject: Re: [lwip-users] to free or not to free (pbuf_free in tcp_recv)
Date: Wed, 30 Jan 2019 14:28:34 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Am 29.01.2019 um 20:08 schrieb address@hidden:
Am 29.01.2019 um 16:32 schrieb address@hidden:
Hi Simon,

It's located in File: contrib-2.1.0\apps\tcpecho_raw\tcpecho_raw.c
in function tcpecho_raw_recv
lines 200 to 247

Oh, right. Don't know why I didn't see that.

Well, I guess that code is not really useful. Currently, the recv
callback is never called with an 'err' other than ERR_OK, but if it
would, there would most certainly not be a pbuf, so 'p' would be NULL.

So this is probably a bad example and it might assert instead for 'p' to
be NULL.

I've just updated the code to assert for "p == NULL" in this case.


reply via email to

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