GNOME Bugzilla – Bug 746810
matroska: fix GValue leak when parsing tags
Last modified: 2015-03-30 12:09:54 UTC
.
Created attachment 300350 [details] [review] matroska: fix GValue leaks when parsing tags gst_tag_list_add_value() doesn't consume the GValue we pass to it so we should always unset it after calling it.
Review of attachment 300350 [details] [review]: If the value is copied internally by the gsttaglist, then I guess there is no need for this gvalue to be copied in this function. We can just pass the original value and let taglist copy it inside to avoid double copying. What do you think?
Yeah I considered that as well but was wondering if the value was copied for another reason that I missed.
I don't see any other reason. GstTagList seems to always copy it internally in the same way: g_value_init and g_value_copy. I assume it would be ok just to pass the original value and let the taglist copy it.
Created attachment 300563 [details] [review] matroska: fix GValue leaks when parsing tags gst_tag_list_add_value() doesn't consume the GValue we pass to it so there is no point copying it.
Thanks for the update commit 592cab1512b52142f10f144cfdbb0abba40e924b Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Date: Thu Mar 26 13:34:53 2015 +0100 matroska: fix GValue leaks when parsing tags gst_tag_list_add_value() doesn't consume the GValue we pass to it so there is no point copying it. https://bugzilla.gnome.org/show_bug.cgi?id=746810