From d0ee909cdd4c6a7c4f21a181661e262c504a38da Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 13 Apr 2016 12:38:05 +0300 Subject: [PATCH] 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 --- plugins/tracers/gstrusage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/tracers/gstrusage.c b/plugins/tracers/gstrusage.c index 29878f348d..7a783ee49c 100644 --- a/plugins/tracers/gstrusage.c +++ b/plugins/tracers/gstrusage.c @@ -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); }