From 1b681dfa2ff408f40ca5e3453e336ff8864af27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 30 Apr 2026 06:29:21 +0200 Subject: [PATCH] Run conn_cleanup on isccc_cc_towire failure in control_respond MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bare return left conn->secret, conn->response, conn->request, and conn->text pinned until the connection itself was torn down — every other error in the function reaches conn_cleanup via goto, and the success path falls into the same label, so the towire-failure return was the lone outlier. Send it through the existing cleanup path. Assisted-by: Claude:claude-opus-4-7 --- bin/named/controlconf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index 048b88f087..6a37a49f94 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -354,11 +354,8 @@ control_respond(controlconnection_t *conn) { /* Skip the length field (4 bytes) */ isc_buffer_add(conn->buffer, 4); - result = isccc_cc_towire(conn->response, &conn->buffer, conn->alg, - &conn->secret); - if (result != ISC_R_SUCCESS) { - return; - } + CHECK(isccc_cc_towire(conn->response, &conn->buffer, conn->alg, + &conn->secret)); isc_buffer_init(&b, conn->buffer->base, 4); isc_buffer_putuint32(&b, conn->buffer->used - 4);