After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747775 - typefind: leak in gst_type_find_element_src_event
typefind: leak in gst_type_find_element_src_event
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-13 12:39 UTC by Guillaume Desmottes
Modified: 2015-04-13 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
typefind: fix leak in gst_type_find_element_src_event() (1.57 KB, patch)
2015-04-13 12:42 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2015-04-13 12:39:49 UTC
.
Comment 1 Guillaume Desmottes 2015-04-13 12:42:50 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>
Comment 2 Thiago Sousa Santos 2015-04-13 13:43:01 UTC
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>
Comment 3 Sebastian Dröge (slomo) 2015-04-13 14:57:01 UTC
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 :)
Comment 4 Guillaume Desmottes 2015-04-13 15:42:39 UTC
(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. :)