Skip to content

Fix inc_comp vector-length ownership - #70

Merged
lenzo-ka merged 1 commit into
masterfrom
kal-inc-comp-veclen-leak
Aug 17, 2026
Merged

Fix inc_comp vector-length ownership#70
lenzo-ka merged 1 commit into
masterfrom
kal-inc-comp-veclen-leak

Conversation

@lenzo-ka

Copy link
Copy Markdown
Contributor

Defect

The means read gives inc_comp ownership of a veclen allocation. The variance read reuses the same out-parameter, overwriting that pointer without releasing the first allocation.

Fix

Release the means-read veclen allocation and clear the pointer before the variance read establishes a new owner. This preserves the existing dimensions and output behavior while restoring the resource-ownership invariant.

Verification

  • cmake -S . -B build
  • cmake --build build

This is corroborated by the landed pstrain implementation in pstrain PR #134.

@lenzo-ka
lenzo-ka merged commit c89e7cd into master Aug 17, 2026
8 checks passed
@lenzo-ka
lenzo-ka deleted the kal-inc-comp-veclen-leak branch August 17, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant