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 742006 - discoverer: _get_missing_elements_installer_details() is documented to return a copy but doesn't
discoverer: _get_missing_elements_installer_details() is documented to return...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal minor
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-26 20:51 UTC by Sam Thursfield
Modified: 2014-12-27 13:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix documentation that incorrectly says a return value should be freed (1.44 KB, patch)
2014-12-26 20:57 UTC, Sam Thursfield
committed Details | Review

Description Sam Thursfield 2014-12-26 20:51:24 UTC
The gst_discoverer_info_get_missing_elements_installer_details()
documentation and annotation says that the return value should be freed
with g_strfreev(), but actually it's owned by the GstDiscovereInfo
object and should definitely not get freed by the caller as well.
Comment 1 Sam Thursfield 2014-12-26 20:57:49 UTC
Created attachment 293364 [details] [review]
Fix documentation that incorrectly says a return value should be freed

The gst_discoverer_info_get_missing_elements_installer_details()
documentation and annotation says that the return value should be freed
with g_strfreev(), but actually it's owned by the GstDiscovereInfo
object and should definitely not get freed by the caller as well.
Comment 2 Tim-Philipp Müller 2014-12-27 13:05:24 UTC
Thanks for the patch, fixed in master (will be picked into 1.4 later):

commit 651fa00c12b8b3a1bf1c9a53396ed0cf8863c096
Author: Sam Thursfield <sam@afuera.me.uk>
Date:   Fri Dec 26 20:48:55 2014 +0000

    Fix documentation that incorrectly says a return value should be freed
    
    The gst_discoverer_info_get_missing_elements_installer_details()
    documentation and annotation says that the return value should be freed
    with g_strfreev(), but actually it's owned by the GstDiscovereInfo
    object and should definitely not get freed by the caller as well.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742006


I was pondering whether to change it to return a copy instead, but then noticed that all the other bits (taglist, toc, etc.) are also const returns of discoverer-owned structs. I'm a bit concerned about changes being made in discoverer while/after someone is still calling this, but haven't checked the code if we can always assume that all streaming has stopped at the time discoverer notifies results.