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 736788 - audiodecoder: leaks events
audiodecoder: leaks events
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.4.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-17 10:19 UTC by Ognyan Tonchev (redstar_)
Modified: 2014-09-19 06:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Unit test which triggers the leaks (4.54 KB, patch)
2014-09-17 10:19 UTC, Ognyan Tonchev (redstar_)
committed Details | Review
fix leaks (778 bytes, patch)
2014-09-17 10:19 UTC, Ognyan Tonchev (redstar_)
committed Details | Review
pad: add annotation to gst_pad_store_sticky_event() (608 bytes, patch)
2014-09-17 10:29 UTC, Ognyan Tonchev (redstar_)
rejected Details | Review

Description Ognyan Tonchev (redstar_) 2014-09-17 10:19:19 UTC
Created attachment 286352 [details] [review]
Unit test which triggers the leaks

audiodecoder leaks memory
Comment 1 Ognyan Tonchev (redstar_) 2014-09-17 10:19:38 UTC
Created attachment 286353 [details] [review]
fix leaks
Comment 2 Ognyan Tonchev (redstar_) 2014-09-17 10:29:36 UTC
Created attachment 286357 [details] [review]
pad: add annotation to gst_pad_store_sticky_event()
Comment 3 Sebastian Dröge (slomo) 2014-09-17 11:10:53 UTC
Comment on attachment 286357 [details] [review]
pad: add annotation to gst_pad_store_sticky_event()

The annotation is not necessary, transfer none is the default
Comment 4 Sebastian Dröge (slomo) 2014-09-17 11:13:12 UTC
commit 5a3ebef605f52864d01b7f02bb95556ab0b53188
Author: Ognyan Tonchev <ognyan@axis.com>
Date:   Wed Sep 17 12:17:27 2014 +0200

    audiodecoder: extend flush_events test to check for event leaks
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736788

commit c674a0aa649b3c47fd46bdf85487f8520250c0a3
Author: Ognyan Tonchev <ognyan@axis.com>
Date:   Wed Sep 17 12:17:53 2014 +0200

    audiodecoder: Don't leak events
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736788
Comment 5 Felix Schwarz 2014-09-17 11:22:10 UTC
A quick grep for GST_EVENT_CAST showed that this code is  you could also check gstvideodecoder.c, gstvideoencoder.c, gstaudioencoder.c and gststreamsplitter.c which seem to suffer from the same problem. Also the code for "_flush_events()" in all these functions seems to be duplicated.
Comment 6 Felix Schwarz 2014-09-17 11:23:22 UTC
And one more comment: If "gst_event_unref (tmp->data);" is the right fix in both cases why not just putting it right before "g_list_free (events);"?
Comment 7 Ognyan Tonchev (redstar_) 2014-09-17 11:56:56 UTC
You are right, will change it that way.