Skip to content

authproxy: Release client request handle in StateAuthorized#13258

Merged
maskit merged 1 commit into
apache:masterfrom
maskit:fix_authproxy_request_hdr_leak
Jun 11, 2026
Merged

authproxy: Release client request handle in StateAuthorized#13258
maskit merged 1 commit into
apache:masterfrom
maskit:fix_authproxy_request_hdr_leak

Conversation

@maskit

@maskit maskit commented Jun 11, 2026

Copy link
Copy Markdown
Member

TSHttpTxnClientReqGet was not paired with TSHandleMLocRelease, unlike every other call site in this file. The handle is a top-level HTTP_HEADER mloc so the release is effectively a no-op today, but matching the documented API contract avoids surprises if the SDK implementation ever changes.

TSHttpTxnClientReqGet was not paired with TSHandleMLocRelease, unlike
every other call site in this file. The handle is a top-level
HTTP_HEADER mloc so the release is effectively a no-op today, but
matching the documented API contract avoids surprises if the SDK
implementation ever changes.
@maskit maskit added this to the 11.0.0 milestone Jun 11, 2026
@maskit maskit self-assigned this Jun 11, 2026
Copilot AI review requested due to automatic review settings June 11, 2026 16:29
@maskit maskit added the authproxy authproxy plugin label Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the authproxy plugin to properly follow the Traffic Server SDK handle lifecycle by pairing TSHttpTxnClientReqGet() with a corresponding TSHandleMLocRelease() in StateAuthorized(). This aligns this call site with the other uses in the same file and avoids relying on current “no-op” behavior for top-level header handles.

Changes:

  • Add TSHandleMLocRelease(request_bufp, TS_NULL_MLOC, request_hdr); after modifying the client request headers in StateAuthorized().

@JosiahWI JosiahWI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes a lock leak

@maskit maskit merged commit e79182f into apache:master Jun 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

authproxy authproxy plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants