summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-12-22 16:31:21 -0600
committerTom Rini <[email protected]>2025-12-22 16:31:21 -0600
commitdac8d9c3cc115cc8549b9d012b0f71222a0ebf02 (patch)
tree87d0bc2239a0ab7a9867a593d9abc0de5c895ce6 /net
parent29ab19c2beade4cc959e14460975ddf7b6886cec (diff)
parent0f6ff53d55ba254de8a995c2a2f5a313acd40ac7 (diff)
Merge tag 'v2026.01-rc5' into next
Prepare v2026.01-rc5
Diffstat (limited to 'net')
-rw-r--r--net/lwip/tftp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c
index 94bacf63075..6c7ffba661e 100644
--- a/net/lwip/tftp.c
+++ b/net/lwip/tftp.c
@@ -279,7 +279,7 @@ int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
if (!arg)
arg = net_boot_file_name;
- if (arg) {
+ if (*arg) {
/* Parse [ip:[port:]]fname */
i = 0;
while ((*(words + i) = strsep(&arg, ":")))
@@ -342,6 +342,7 @@ int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
if (tftp_loop(eth_get_dev(), laddr, fname, srvip, port) < 0)
ret = CMD_RET_FAILURE;
out:
- free(arg);
+ if (arg != net_boot_file_name)
+ free(arg);
return ret;
}