diff options
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; |