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
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jul 29, 2026
…3258)

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.
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jul 29, 2026
…3258)

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.

(cherry picked from commit e79182f)
@cmcfarlen cmcfarlen moved this to Picked v10.2.0 in ATS v10.2.x Jul 29, 2026
@github-project-automation github-project-automation Bot moved this from Picked v10.2.0 to For v10.2.0 in ATS v10.2.x Jul 29, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Jul 29, 2026
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

authproxy authproxy plugin

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

4 participants