cw-out: unify the error handling pattern in cw_out_do_write

to proper set the error status and release resource

Closes #19195
This commit is contained in:
x2018 2025-10-22 19:07:57 +08:00 committed by Daniel Stenberg
parent 9e15b07638
commit 28ebaf86ce
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -403,7 +403,7 @@ static CURLcode cw_out_do_write(struct cw_out_ctx *ctx,
/* still have buffered data, append and flush */
result = cw_out_append(ctx, data, otype, buf, blen);
if(result)
return result;
goto out;
result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
if(result)
goto out;