decodebin3: fix memory leak when remove candidate decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4955>
This commit is contained in:
Hou Qi 2023-07-03 10:02:53 +08:00 committed by GStreamer Marge Bot
parent d5a9ca8ef6
commit dbdbf2d256

View file

@ -949,6 +949,7 @@ remove_candidate_decoder (GstDecodebin3 * dbin, CandidateDecoder * candidate)
g_list_remove (dbin->candidate_decoders, candidate);
if (candidate->error)
gst_message_unref (candidate->error);
g_free (candidate);
GST_OBJECT_UNLOCK (dbin);
}