mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_dhcp_pool_issue_on_dhcp_server_v5.2' into 'release/v5.2'
fix(lwip): fixed the dhcp pool error on dhcp server (v5.2) See merge request espressif/esp-idf!31267
This commit is contained in:
commit
e10eb71014
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -1399,7 +1399,7 @@ static void kill_oldest_dhcps_pool(dhcps_t *dhcps)
|
||||
assert(pre != NULL && pre->pnext != NULL); // Expect the list to have at least 2 nodes
|
||||
p = pre->pnext;
|
||||
minpre = pre;
|
||||
minp = p;
|
||||
minp = pre;
|
||||
|
||||
while (p != NULL) {
|
||||
pdhcps_pool = p->pnode;
|
||||
@ -1413,8 +1413,11 @@ static void kill_oldest_dhcps_pool(dhcps_t *dhcps)
|
||||
pre = p;
|
||||
p = p->pnext;
|
||||
}
|
||||
|
||||
if (minp == dhcps->plist) {
|
||||
dhcps->plist = minp->pnext;
|
||||
} else {
|
||||
minpre->pnext = minp->pnext;
|
||||
}
|
||||
free(minp->pnode);
|
||||
minp->pnode = NULL;
|
||||
free(minp);
|
||||
|
Loading…
Reference in New Issue
Block a user