[Top][All Lists]

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

[lwip-devel] Closing connections with rawapi

From: Per Knytt
Subject: [lwip-devel] Closing connections with rawapi
Date: Wed, 30 Apr 2014 13:46:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)


I'm using lwip 1.4.1 with the rawapi.

What is the proper way to free an allocated pcb when tcp_connect()
fails? I tried to use tcp_abort() since if tcp_connect() fails due to
lack of memory then tcp_close() might fail for that reason as
well. However, when tcp_connect() fails it leaves the pcb on
tcp_bound_pcbs and tcp_abort() does not remove it from there, it just
frees it, leading to invalid memory accesses down the line.

Is it unreasonable to use tcp_abort() to clean up from tcp_connect()
failures or is this a bug?

Per Knytt
H&D Wireless AB

reply via email to

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