summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-03-10 23:56:47 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2008-03-10 23:56:47 +0100
commit4dba16c692bbe50ae22e3d678a01d054c4e52bb4 (patch)
tree96b25c69770ca4e57d2b115ff4175189828d8833 /commands
parent38e5fc1735b331cedcb7cca08835b6bb1d441b75 (diff)
downloadbarebox-4dba16c692bbe50ae22e3d678a01d054c4e52bb4.tar.gz
barebox-4dba16c692bbe50ae22e3d678a01d054c4e52bb4.tar.xz
close net_store_fd after usage. Man there are bugs to find...
Diffstat (limited to 'commands')
-rw-r--r--commands/net.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/commands/net.c b/commands/net.c
index faf87d6ec6..93c6365ef6 100644
--- a/commands/net.c
+++ b/commands/net.c
@@ -216,16 +216,16 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
safe_strncpy (BootFile, remotefile, sizeof(BootFile));
- if ((size = NetLoop(proto)) < 0)
- return 1;
+ if ((size = NetLoop(proto)) < 0) {
+ rcode = size;
+ goto out;
+ }
/* NetLoop ok, update environment */
netboot_update_env();
- /* done if no file was loaded (no errors though) */
- if (size == 0)
- return 0;
-
+out:
+ close(net_store_fd);
return rcode;
}