aboutsummaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorJames Housley <jim@thehousleys.net>2007-06-28 11:11:29 +0000
committerJames Housley <jim@thehousleys.net>2007-06-28 11:11:29 +0000
commitaed0cc6f2a9a7fdaae08ad6700687f7200b4ebaa (patch)
tree5ef37d17b276e70f2b924243d6058d4681b8d02a /lib/file.c
parentd500c468fc99816a7bdd817404aa489b065ae64d (diff)
Using fdopen() is a more correct way to implement the CURLOPT_NEW_FILE_PREMS
file.c, but the debug interface was missing. This adds the routines needed to make the memory debuging work for fdopen().
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/file.c b/lib/file.c
index cec98986b..4cab1f1b9 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -231,8 +231,7 @@ static CURLcode file_upload(struct connectdata *conn)
failf(data, "Can't open %s for writing", file->path);
return CURLE_WRITE_ERROR;
}
- close(fd);
- fp = fopen(file->path, "wb");
+ fp = fdopen(fd, "wb");
}
if(!fp) {