mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-22 10:10:14 -04:00
Run conn_cleanup on isccc_cc_towire failure in control_respond
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
This commit is contained in:
parent
28025ceff8
commit
1b681dfa2f
1 changed files with 2 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue