[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: Tue, 29 Jan 2019 20:08:40 +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 16:32 schrieb address@hidden:
Hi Simon,

thanks for your reply.

In the contrib 2.1.0 is the exact same code snippet.
So my question is still unanswered. How to handle this correctly?

Could you point me to it? I can't find it.


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.


reply via email to

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