mirror of
https://github.com/curl/curl.git
synced 2026-06-04 10:54:17 +03:00
- 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)
This commit is contained in:
parent
1962ebf8e7
commit
3789e2e6ce
3 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue