GNOME Bugzilla – Bug 721858
g_content_type_get_mime_type does not indicate return value is to be free'd
Last modified: 2018-05-24 16:11:41 UTC
Created attachment 265825 [details] [review] Patch adding the appropriate string to the doc g_content_type_get_mime_type duplicates an internal string but the documentation does not indicate that the return value must be free'd by the caller, hence leading to memory leaks.
Review of attachment 265825 [details] [review]: thanks for your patch, though that's not complete. ::: old/gcontenttype.c @@ +383,3 @@ * Gets the mime type for the content type, if one is registered. * * Returns: (allow-none): the registered mime type for the given @type, we should add the (transfer full) annotation. even if it is automatic for char*, this would allow gtk-doc to add the hint directly in the documentation.
Emmanuele, Thanks for the comment. I'm afraid I don't know where/how to add this annotation -- I'd never heard of it! Can I please hand it over to you to update the patch? Thanks!
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/811.