From 419d117851d81b32929e0eb358ae1171b3e31a59 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 7 Apr 2011 19:44:44 +0100 Subject: [PATCH] queue2: fix minor memory leak --- plugins/elements/gstqueue2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index 9c8c838..d8c07db 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -2796,7 +2796,7 @@ gst_queue2_src_activate_pull (GstPad * pad, gboolean active) result = gst_queue2_open_temp_location_file (queue); } else if (!queue->ring_buffer) { queue->ring_buffer = g_malloc (queue->ring_buffer_max_size); - result = !!queue->ring_buffer; + result = ! !queue->ring_buffer; } else { result = TRUE; } @@ -2891,6 +2891,7 @@ gst_queue2_change_state (GstElement * element, GstStateChange transition) g_free (queue->ring_buffer); queue->ring_buffer = NULL; } + clean_ranges (queue); } if (queue->starting_segment != NULL) { gst_event_unref (queue->starting_segment); -- 2.7.4