Skip to content

avoid extra refcount increment in GetField#155

Merged
dicej merged 1 commit into
bytecodealliance:mainfrom
dicej:fix-extra-optional-refcount
Jun 2, 2025
Merged

avoid extra refcount increment in GetField#155
dicej merged 1 commit into
bytecodealliance:mainfrom
dicej:fix-extra-optional-refcount

Conversation

@dicej

@dicej dicej commented Jun 2, 2025

Copy link
Copy Markdown
Collaborator

When returning the payload of a non-None Optional (i.e. just the value we were passed) in GetField, we were accidentally incrementing its refcount, resulting in a leak.

Fixes #152

When returning the payload of a non-`None` `Optional` (i.e. just the value we
were passed) in `GetField`, we were accidentally incrementing its refcount,
resulting in a leak.

Fixes bytecodealliance#152

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
@dicej dicej merged commit 56fee39 into bytecodealliance:main Jun 2, 2025
4 checks passed
@dicej dicej deleted the fix-extra-optional-refcount branch June 2, 2025 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory not released for WASI resources

1 participant