From 28ebaf86ce7d524f8b8088560d70039582acfe32 Mon Sep 17 00:00:00 2001 From: x2018 Date: Wed, 22 Oct 2025 19:07:57 +0800 Subject: [PATCH] cw-out: unify the error handling pattern in cw_out_do_write to proper set the error status and release resource Closes #19195 --- lib/cw-out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cw-out.c b/lib/cw-out.c index 7a9274b5f2..1f40316492 100644 --- a/lib/cw-out.c +++ b/lib/cw-out.c @@ -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;