From 4dba16c692bbe50ae22e3d678a01d054c4e52bb4 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 10 Mar 2008 23:56:47 +0100 Subject: close net_store_fd after usage. Man there are bugs to find... --- commands/net.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'commands/net.c') 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; } -- cgit v1.2.3