summaryrefslogtreecommitdiff
path: root/doc/develop/uefi
diff options
context:
space:
mode:
authorDavid Lechner <[email protected]>2026-06-11 18:36:08 -0500
committerJerome Forissier <[email protected]>2026-06-23 13:13:16 +0200
commit747720eb73642fcab9693833f8943f3f37bdb881 (patch)
tree2b9dd1f95def0e660ea600969d4796d718c14038 /doc/develop/uefi
parent8382c2ad5284fdfffb6848fb429c40fdf169bf3a (diff)
net: lwip: wget: fix error handling in wget_do_request()
Split wget_do_request() into two functions to make error handling less error-prone. After a successful call to net_lwip_new_netif(), net_lwip_remove_netif() must always be called to prevent leaks. This was missed in the CACERT section of the code where we returned on error without cleaning up. Instead of adding more calls to net_lwip_remove_netif(), refactor the code into two functions. The outer function handles managing the netif lifecycle. The inner function no longer has to worry about cleaning up before returning on error. To keep things simple, the `path` local variable is removed during the refactoring. Instead, ctx.path is used directly everywhere. Fixes: 3c656c928bd7 ("net: lwip: add wget command") Reviewed-by: Jerome Forissier <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Signed-off-by: David Lechner <[email protected]>
Diffstat (limited to 'doc/develop/uefi')
0 files changed, 0 insertions, 0 deletions