[git commit master 1/1] wget: check for final write errors for -O FILE too

Denys Vlasenko vda.linux at googlemail.com
Tue Feb 15 10:03:53 UTC 2011


commit: http://git.busybox.net/busybox/commit/?id=28556b95febc77ebdd2d2f2e0be4a0157dcaf735
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/wget.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/networking/wget.c b/networking/wget.c
index 6c9a512..ad2bfa4 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -941,5 +941,8 @@ int wget_main(int argc UNUSED_PARAM, char **argv)
 	while (*argv)
 		exitcode |= download_one_url(*argv++);
 
+	if (G.output_fd >= 0)
+		xclose(G.output_fd);
+
 	return exitcode;
 }
-- 
1.7.3.4



More information about the busybox-cvs mailing list