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 734523 - glbufferpool: Unref allocator after usage
glbufferpool: Unref allocator after usage
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-09 11:44 UTC by Sebastian Rasmussen
Modified: 2014-08-13 15:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glbufferpool: fix allocator leak in some cases (2.32 KB, patch)
2014-08-10 22:01 UTC, Tim-Philipp Müller
none Details | Review
glbufferpool: fix allocator leak in some cases (v2) (2.36 KB, patch)
2014-08-10 22:23 UTC, Tim-Philipp Müller
committed Details | Review

Description Sebastian Rasmussen 2014-08-09 11:44:39 UTC
gst_allocator_find() returns a reference to a GstAllocator. This needs to be unreffed when the bufferpool is finalized. The attached patch adds the unreferencing.
Comment 1 Tim-Philipp Müller 2014-08-10 22:01:42 UTC
Created attachment 283044 [details] [review]
glbufferpool: fix allocator leak in some cases

Something like this? (But then priv->allocator is not actually ever used, so might just as well get rid of it; same for priv->params btw).
Comment 2 Tim-Philipp Müller 2014-08-10 22:23:10 UTC
Created attachment 283049 [details] [review]
glbufferpool: fix allocator leak in some cases (v2)

Fix silly bug (unref old allocator not new one before storing the new one).
Comment 3 Sebastian Rasmussen 2014-08-10 22:31:17 UTC
As discussed elsewhere, your patch is more fullfledged than mine, so I prefer yours. I'll refrain from uploading mine. :)
Comment 4 Sebastian Dröge (slomo) 2014-08-13 15:06:00 UTC
commit 21e6989848a081c952c0f0dda1275870f43cb2f2
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Sun Aug 10 22:58:22 2014 +0100

    glbufferpool: fix allocator leak in some cases
    
    Spotted by Sebastian Rasmussen.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734523