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 380129 - gst_plugin_feature_load doesn't consistently ref a returned object
gst_plugin_feature_load doesn't consistently ref a returned object
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-28 13:08 UTC by Jan Schmidt
Modified: 2006-12-07 12:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix refcounting (3.47 KB, patch)
2006-11-28 13:08 UTC, Jan Schmidt
accepted-commit_after_freeze Details | Review

Description Jan Schmidt 2006-11-28 13:08:33 UTC
At the moment, gst_plugin_feature_load only refs the returned object the first time it is loaded, not if it is already loaded, despite what the documentation says. 

Fortunately, this is compensated at the moment by the fact that noone unrefs the returned object. *Un*fortunately, at the end of the day this means we leak plugin features when closing down, which makes me sad.

Attaching a patch which makes gst_plugin_feature_load do what it is supposed to, and fixes refcounting in the places it's used in the core.
Comment 1 Jan Schmidt 2006-11-28 13:08:53 UTC
Created attachment 77292 [details] [review]
fix refcounting
Comment 2 Jan Schmidt 2006-11-28 14:41:37 UTC
Leaving this until after the releases, because it's not a regression.
Comment 3 Jan Schmidt 2006-12-07 12:17:42 UTC
        * gst/gstelementfactory.c: (gst_element_factory_create):
        * gst/gstpluginfeature.c: (gst_plugin_feature_load):
        * gst/gsttypefindfactory.c: (gst_type_find_factory_call_function):
        * tools/gst-inspect.c: (print_element_info):
        Fix refcounting of gst_plugin_feature_load to match the docs. 
        Fixes: #380129