[Bug 760821] tracerrecord: Fix memory leaks and mishandlings

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jan 21 10:46:27 PST 2016


https://bugzilla.gnome.org/show_bug.cgi?id=760821

Tim-Philipp Müller <t.i.m at zen.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |t.i.m at zen.co.uk

--- Comment #17 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Problem is that this code is wrong and is bound/expected to leak:

  gst_structure_new ("test.class",
      "string", GST_TYPE_STRUCTURE, gst_structure_new (...),
      NULL);

just like this would leak:

  gst_structure_new ("test.class",
      "string", G_TYPE_STRING, g_strdup ("hello"),
      NULL);

When the varargs are collected, copies are made and refs are taken by the
collector, so you need to free the newly-allocated struct here.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list