rusage: properly free the queue memory

The queue is allocated as part of the tracer struct so we should not
use g_queue_free() to free it.

https://bugzilla.gnome.org/show_bug.cgi?id=764985
This commit is contained in:
Guillaume Desmottes 2016-04-13 12:38:05 +03:00 committed by Tim-Philipp Müller
parent 60f088026a
commit d0ee909cdd

View file

@ -85,7 +85,8 @@ make_trace_values (GstClockTime window)
static void
free_trace_values (GstTraceValues * self)
{
g_queue_free_full (&self->values, free_trace_value);
g_queue_foreach (&self->values, (GFunc) free_trace_value, NULL);
g_queue_clear (&self->values);
g_slice_free (GstTraceValues, self);
}