latency tracer: Fix leaks in the reported latency trace

The stack item was not freed as it was supposed, causing leaks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/269>
This commit is contained in:
Nicolas Dufresne 2020-07-15 16:12:02 -04:00
parent e07bb52bf7
commit f11e9b3aa0

View file

@ -510,8 +510,11 @@ do_query_post (GstLatencyTracer * tracer, GstClockTime ts, GstPad * pad,
while (value && value->peer_element == element) {
min_prev = MAX (value->min, min_prev);
max_prev = MAX (value->max, max_prev);
latency_query_table_value_destroy (value);
value = local_latency_query_stack_pop ();
}
if (value)
latency_query_table_value_destroy (value);
/* Push to stack */
value = g_new0 (struct LatencyQueryTableValue, 1);