Fix: leak of CIccPcsXform in CIccCmm::CheckPCSConnections on Connect failure (#1337)#1338
Merged
xsscx merged 1 commit intoJun 14, 2026
Conversation
…failure (InternationalColorConsortium#1337) CheckPCSConnections allocates a CIccPcsXform, calls Connect()/ConnectFirst(), and either hands it to the xform list (success) or deletes it. The middle of the three CIccPcsXform blocks returned on a hard Connect() failure (rv != icCmmStatOk && rv != icCmmStatIdentityXform) WITHOUT deleting the locally-owned pPcs, leaking it. The sibling ConnectFirst block above and the trailing block below both delete on their failure paths. Surfaced by the iccApplyToLink 200-QA ASan run (InternationalColorConsortium#1337): Direct leak of 144 byte(s) ... CIccCmm::CheckPCSConnections -> CIccCmm::Begin Add the missing `delete pPcs;` before the failure return so ownership is released on every path. The success/identity paths are unchanged; the search -INIT success path (which exercises CheckPCSConnections) stays ASan-clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ChrisCoxArt
approved these changes
Jun 14, 2026
Member
|
Note: Auto-Merge is On. Merge on your Schedule. |
Contributor
Author
This was referenced Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
CIccCmm::CheckPCSConnectionsleak surfaced by the iccApplyToLink 200-QA ASan run (#1337):CheckPCSConnectionsbuilds up to threeCIccPcsXformobjects; each is either pushed onto the xform list (ownership transferred) or deleted. The middle block returned on a hardConnect()failure (rv != icCmmStatOk && rv != icCmmStatIdentityXform) without deleting the locally-ownedpPcs— leaking it. The siblingConnectFirstblock above and the trailing block below both delete on their failure paths; this one was the outlier.Fix
One line —
delete pPcs;before the failurereturn, with comments documenting the ownership on each branch (transfer-to-list on success, discard on identity, free on failure).Verification
-INITsuccess path (which exercisesCheckPCSConnections' success/identity branches) stays ASan/LSan-clean.Connect()-hard-failure chain that triggers the leak lives in the 200-QA profile set/script (not in-tree), so no deterministic CTest is added here; the change is a self-evident missing-delete mirroring the adjacent blocks.🤖 Generated with Claude Code