mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-03 10:43:55 +00:00
bus: Use g_list_free_full() instead of manually unreffing and freeing
Also unref the messages, not the GList nodes.
This commit is contained in:
parent
f50d809c25
commit
d8f572647f
1 changed files with 2 additions and 6 deletions
|
@ -446,7 +446,7 @@ void
|
||||||
gst_bus_set_flushing (GstBus * bus, gboolean flushing)
|
gst_bus_set_flushing (GstBus * bus, gboolean flushing)
|
||||||
{
|
{
|
||||||
GstMessage *message;
|
GstMessage *message;
|
||||||
GList *l, *message_list = NULL;
|
GList *message_list = NULL;
|
||||||
|
|
||||||
GST_OBJECT_LOCK (bus);
|
GST_OBJECT_LOCK (bus);
|
||||||
|
|
||||||
|
@ -464,11 +464,7 @@ gst_bus_set_flushing (GstBus * bus, gboolean flushing)
|
||||||
|
|
||||||
GST_OBJECT_UNLOCK (bus);
|
GST_OBJECT_UNLOCK (bus);
|
||||||
|
|
||||||
for (l = message_list; l; l = l->next) {
|
g_list_free_full (message_list, (GDestroyNotify) gst_message_unref);
|
||||||
message = GST_MESSAGE (l);
|
|
||||||
gst_message_unref (message);
|
|
||||||
}
|
|
||||||
g_list_free (message_list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue