aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-03-09 21:51:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-03-09 21:51:38 +0000
commit3789e2e6ce705ce4c23c672dc5f05aa254b451c0 (patch)
tree784a37ef31e9e4833840ff830008b4861bb2475a
parent1962ebf8e7f918638c1601f2b05a705f502150a3 (diff)
- Justin Fletcher fixed a file descriptor leak in the curl tool when trying to
upload a file it couldn't open. Bug #1676581 (http://curl.haxx.se/bug/view.cgi?id=1676581)
-rw-r--r--CHANGES5
-rw-r--r--RELEASE-NOTES2
-rw-r--r--src/main.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index f47d35b3b..a7466051b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@
Changelog
+Daniel (9 March 2007)
+- Justin Fletcher fixed a file descriptor leak in the curl tool when trying to
+ upload a file it couldn't open. Bug #1676581
+ (http://curl.haxx.se/bug/view.cgi?id=1676581)
+
Dan F (9 March 2007)
- Updated the test harness to check for protocol support before running each
test, fixing KNOWN_BUGS #11.
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 079d7d0ce..636a0d91b 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -58,6 +58,6 @@ advice from friends like these:
Yang Tse, Manfred Schwarb, Michael Wallner, Jeff Pohlmeyer, Shmulik Regev,
Rob Crittenden, Robert A. Monat, Dan Fandrich, Duncan Mac-Vicar Prett,
Michal Marek, Robson Braga Araujo, Ian Turner, Linus Nielsen Feltzing,
- Ravi Pratap, Adam D. Moss, Jose Kahan, Hang Kin Lau
+ Ravi Pratap, Adam D. Moss, Jose Kahan, Hang Kin Lau, Justin Fletcher
Thanks! (and sorry if I forgot to mention someone)
diff --git a/src/main.c b/src/main.c
index fcc519245..ae7455037 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3931,6 +3931,8 @@ operate(struct Configurable *config, int argc, char *argv[])
infd=(FILE *) fopen(uploadfile, "rb");
if (!infd || stat(uploadfile, &fileinfo)) {
helpf("Can't open '%s'!\n", uploadfile);
+ if(infd)
+ fclose(infd);
return CURLE_READ_ERROR;
}
infdfopen=TRUE;