mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
queue2: fix minor memory leak
This commit is contained in:
parent
01d016e720
commit
419d117851
1 changed files with 2 additions and 1 deletions
|
@ -2796,7 +2796,7 @@ gst_queue2_src_activate_pull (GstPad * pad, gboolean active)
|
||||||
result = gst_queue2_open_temp_location_file (queue);
|
result = gst_queue2_open_temp_location_file (queue);
|
||||||
} else if (!queue->ring_buffer) {
|
} else if (!queue->ring_buffer) {
|
||||||
queue->ring_buffer = g_malloc (queue->ring_buffer_max_size);
|
queue->ring_buffer = g_malloc (queue->ring_buffer_max_size);
|
||||||
result = !!queue->ring_buffer;
|
result = ! !queue->ring_buffer;
|
||||||
} else {
|
} else {
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -2891,6 +2891,7 @@ gst_queue2_change_state (GstElement * element, GstStateChange transition)
|
||||||
g_free (queue->ring_buffer);
|
g_free (queue->ring_buffer);
|
||||||
queue->ring_buffer = NULL;
|
queue->ring_buffer = NULL;
|
||||||
}
|
}
|
||||||
|
clean_ranges (queue);
|
||||||
}
|
}
|
||||||
if (queue->starting_segment != NULL) {
|
if (queue->starting_segment != NULL) {
|
||||||
gst_event_unref (queue->starting_segment);
|
gst_event_unref (queue->starting_segment);
|
||||||
|
|
Loading…
Reference in a new issue