GNOME Bugzilla – Bug 747775
typefind: leak in gst_type_find_element_src_event
Last modified: 2015-04-13 15:42:39 UTC
.
Created attachment 301455 [details] [review] typefind: fix leak in gst_type_find_element_src_event() gst_type_find_element_src_event() is supposed to consume @event but wasn't doing so when it was handling the event itself. https://bugzilla.gnome.org/show_bug.cgi?id=747775 Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thanks for the patch. commit 15fd78f0b6b0008c8723cd44e454ad945c004b25 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Date: Mon Apr 13 14:40:22 2015 +0200 typefind: fix leak in gst_type_find_element_src_event() gst_type_find_element_src_event() is supposed to consume @event but wasn't doing so when it was handling the event itself. https://bugzilla.gnome.org/show_bug.cgi?id=747775 Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Review of attachment 301455 [details] [review]: ::: plugins/elements/gsttypefindelement.c @@ +513,3 @@ GST_EVENT_TYPE (event) == GST_EVENT_SEEK) { + result = gst_type_find_element_seek (typefind, event); + gst_mini_object_unref (GST_MINI_OBJECT_CAST (event)); Why not gst_event_unref()? Looks less ugly :)
(In reply to Sebastian Dröge (slomo) from comment #3) > Review of attachment 301455 [details] [review] [review]: > > ::: plugins/elements/gsttypefindelement.c > @@ +513,3 @@ > GST_EVENT_TYPE (event) == GST_EVENT_SEEK) { > + result = gst_type_find_element_seek (typefind, event); > + gst_mini_object_unref (GST_MINI_OBJECT_CAST (event)); > > Why not gst_event_unref()? Looks less ugly :) I just copy/pasted from the early return 5 lines above. :)