Commit e74415e6 authored by msizanoen1's avatar msizanoen1
Browse files

arg-cache: Use BoxedInTransferNone::release for GBytesInTransferNone::release

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 GNOME/gnome-shell#5501
parent eedbd2ed
Pipeline #401050 passed with stages
in 7 minutes and 5 seconds
......@@ -599,7 +599,7 @@ struct GBytesInTransferNone : GBytesIn {
using GBytesIn::GBytesIn;
bool release(JSContext* cx, GjsFunctionCallState* state, GIArgument* in_arg,
GIArgument* out_arg) override {
return BoxedIn::release(cx, state, in_arg, out_arg);
return BoxedInTransferNone::release(cx, state, in_arg, out_arg);
}
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment