Backport !3297 “gdbusinterfaceskeleton: Fix a use-after-free of a GDBusMethodInvocation” to glib-2-74
requested to merge pwithnall/glib:backport-3297-use-after-free-gdbus-method-invocation-glib-2-74 into glib-2-74
This GDBusMethodInvocation
may be shared across threads, with no
guarantee on the strong ref in one thread outlasting any refs in other
threads — so it needs a ref in this helper struct.
This should fix a use-after-free where the GDBusMethodInvocation
is
freed from g_value_unset()
after g_signal_emit()
returns in
dispatch_in_thread_func()
in one thread; but then dereferenced again
in g_source_destroy_internal()
from another thread.
Signed-off-by: Philip Withnall pwithnall@endlessos.org
Fixes: #2924 (closed)
Closes #2924 (closed)
Trivial backport of !3297 (merged) to glib-2-74
.