summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-05-22 16:18:36 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-05-22 16:19:30 +0200
commit42ed88e70a7e6c3eeca2e624561964dab235f300 (patch)
tree2a7e4081a5df0ae1cd53fd53ed84fc71ffa017bc /src
parent84d811f6af15f9e3ce39f8603e6a2dacf7cdbcba (diff)
downloadcurl-42ed88e70a7e6c3eeca2e624561964dab235f300.tar.gz
curl: fix potential NULL dereference
Coverity CID 1299428: Dereference after null check (FORWARD_NULL)
Diffstat (limited to 'src')
-rw-r--r--src/tool_operate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 5f7b79211..4c3ed077b 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1497,7 +1497,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
if(retry_sleep > RETRY_SLEEP_MAX)
retry_sleep = RETRY_SLEEP_MAX;
}
- if(outs.bytes && outs.filename) {
+ if(outs.bytes && outs.filename && outs.stream) {
/* We have written data to a output file, we truncate file
*/
if(!global->mute)