diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-03-09 21:51:38 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-03-09 21:51:38 +0000 |
commit | 3789e2e6ce705ce4c23c672dc5f05aa254b451c0 (patch) | |
tree | 784a37ef31e9e4833840ff830008b4861bb2475a | |
parent | 1962ebf8e7f918638c1601f2b05a705f502150a3 (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-- | CHANGES | 5 | ||||
-rw-r--r-- | RELEASE-NOTES | 2 | ||||
-rw-r--r-- | src/main.c | 2 |
3 files changed, 8 insertions, 1 deletions
@@ -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; |