pad: Don't leak user_data in gst_pad_start_task
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Thu, 9 Feb 2023 12:53:48 +0000 (13:53 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 10 Feb 2023 01:40:35 +0000 (01:40 +0000)
commitcbcd2a44ff8222867eb91646d17d0d55b5a3eeba
tree18b9cb7c46258d5dd6a444fcfd3824e0c69385fe
parent06428afbadf0494abaae22e9101794db302eb7d4
pad: Don't leak user_data in gst_pad_start_task

When the task already exists, we forgot to free the passed `user_data`.
This wasn't an issue for most C code, which doesn't pass a
`GDestroyNotify`, but bindings such as gstreamer-rs do!

That said, allocating a trampoline in gstreamer-rs just for it to get
thrown away again is awkward. Maybe we need a `gst_pad_resume_task`?

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3925>
subprojects/gstreamer/gst/gstpad.c