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 /src | |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |