Fix failure to close listening socket (#3678).

This commit is contained in:
Jade Mattsson 2025-03-22 15:49:52 +11:00
parent d53f8fe9e4
commit b1690f1f1e
1 changed files with 5 additions and 5 deletions

View File

@ -351,11 +351,11 @@ void handle_dns_event(task_param_t param, task_prio_t prio)
static err_t netconn_close_and_delete(struct netconn *conn) {
err_t err = netconn_close(conn);
if (err == ERR_OK)
netconn_delete(conn);
return err;
// netconn_close() no longer returns valid return codes, as the code
// path we get in the IDF ends up using uninitialised memory.
netconn_close(conn);
netconn_delete(conn);
return ERR_OK;
}