mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
Fix bug #52189: list add and remove bug in <lwiperf.c>
Apply patch from xuyao hong
This commit is contained in:
parent
8fc69c9858
commit
856b0c3260
@ -167,11 +167,8 @@ static void lwiperf_tcp_err(void *arg, err_t err);
|
||||
static void
|
||||
lwiperf_list_add(lwiperf_state_base_t *item)
|
||||
{
|
||||
if (lwiperf_all_connections == NULL) {
|
||||
item->next = lwiperf_all_connections;
|
||||
lwiperf_all_connections = item;
|
||||
} else {
|
||||
item = lwiperf_all_connections;
|
||||
}
|
||||
}
|
||||
|
||||
/** Remove an iperf session from the 'active' list */
|
||||
@ -185,7 +182,7 @@ lwiperf_list_remove(lwiperf_state_base_t *item)
|
||||
if (prev == NULL) {
|
||||
lwiperf_all_connections = iter->next;
|
||||
} else {
|
||||
prev->next = item;
|
||||
prev->next = iter->next;
|
||||
}
|
||||
/* @debug: ensure this item is listed only once */
|
||||
for (iter = iter->next; iter != NULL; iter = iter->next) {
|
||||
|
Loading…
Reference in New Issue
Block a user