Skip to content

Fix memory leak when passing a "transfer none" GBytes parameter to a native function

msizanoen1 requested to merge msizanoen1/gjs:gbytes-mem-leak-fix into master

GBytes parameters in "transfer none" mode needs to be released after the function returns, otherwise its reference count will be incremented even if the callee doesn't own the reference, causing a memory leak. Fix this by using BoxedInTransferNone::release instead of BoxedIn::release which is a no-op.

Fixes #483 (closed)

Edited by msizanoen1

Merge request reports