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 748903 - fix navigation event leaks
fix navigation event leaks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-04 15:58 UTC by Guillaume Desmottes
Modified: 2015-05-05 17:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
navigation: fix structure leak if subclass doesn't implement send_event() (893 bytes, patch)
2015-05-04 16:01 UTC, Guillaume Desmottes
committed Details | Review
xvimagesink: fix navigation event leak when early returning (1.25 KB, patch)
2015-05-04 16:02 UTC, Guillaume Desmottes
none Details | Review
xvimagesink: fix navigation event leak when not handled (1.19 KB, patch)
2015-05-04 16:02 UTC, Guillaume Desmottes
committed Details | Review
xvimagesink: fix navigation event leak when early returning (1.22 KB, patch)
2015-05-05 16:26 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2015-05-04 15:58:20 UTC
.
Comment 1 Guillaume Desmottes 2015-05-04 16:01:57 UTC
Created attachment 302873 [details] [review]
navigation: fix structure leak if subclass doesn't implement send_event()

The send_event() implementation is supposed to consume @structure.
Comment 2 Guillaume Desmottes 2015-05-04 16:02:02 UTC
Created attachment 302874 [details] [review]
xvimagesink: fix navigation event leak when early returning

Create the event *after* the early return check so it's not leaked.
Comment 3 Guillaume Desmottes 2015-05-04 16:02:08 UTC
Created attachment 302875 [details] [review]
xvimagesink: fix navigation event leak when not handled

gst_navigation_message_new_event() is *not* consuming the event so we should
always drop our extra reference.
Comment 4 Thiago Sousa Santos 2015-05-05 15:57:28 UTC
Review of attachment 302874 [details] [review]:

::: sys/xvimage/xvimagesink.c
@@ +1147,3 @@
 
+    event = gst_event_new_navigation (structure);
+

This is correct but I think it would be even better if it was moved further down after the unlock so the contention area has only what should be protected.
Comment 5 Guillaume Desmottes 2015-05-05 16:26:10 UTC
Created attachment 302936 [details] [review]
xvimagesink: fix navigation event leak when early returning

Create the event *after* the early return check so it's not leaked.
Comment 6 Thiago Sousa Santos 2015-05-05 17:31:51 UTC
commit ca100d117cc5d3c9ed49a28cb1d7696ca50f42f8
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Mon May 4 17:59:30 2015 +0200

    xvimagesink: fix navigation event leak when early returning
    
    Create the event *after* the early return check so it's not leaked.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748903

commit 9d85e23c3d960724a551e057cf412989174ee875
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Mon May 4 18:00:18 2015 +0200

    xvimagesink: fix navigation event leak when not handled
    
    gst_navigation_message_new_event() is *not* consuming the event so we should
    always drop our extra reference.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748903

commit f90bb8140ddbf86e73771946d6c5968b56e0caef
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Mon May 4 17:58:38 2015 +0200

    navigation: fix structure leak if subclass doesn't implement send_event()
    
    The send_event() implementation is supposed to consume @structure.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748903