1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

curl: fix potential NULL dereference

Coverity CID 1299428: Dereference after null check (FORWARD_NULL)
This commit is contained in:
Daniel Stenberg 2015-05-22 16:18:36 +02:00
parent 84d811f6af
commit 42ed88e70a

View File

@ -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)