[Bug 764985] rusage tracer: crash when freeing memory
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Apr 13 09:42:35 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=764985
--- Comment #3 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 325850:
--> (https://bugzilla.gnome.org/review?bug=764985&attachment=325850)
::: plugins/tracers/gstrusage.c
@@ +87,3 @@
{
+ g_queue_foreach (&self->values, (GFunc) free_trace_value, NULL);
+ g_queue_clear (&self->values);
It's more efficient to do
while ((item = g_queue_pop_head (&self->values)))
free_tracer_value (item);
btw. Your solution iterates the queue twice but that shouldn't matter too much
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