projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f50d809
)
bus: Use g_list_free_full() instead of manually unreffing and freeing
author
Sebastian Dröge
<sebastian@centricular.com>
Fri, 13 Mar 2015 15:31:30 +0000
(15:31 +0000)
committer
Sebastian Dröge
<sebastian@centricular.com>
Fri, 13 Mar 2015 15:31:30 +0000
(15:31 +0000)
Also unref the messages, not the GList nodes.
gst/gstbus.c
patch
|
blob
|
history
diff --git
a/gst/gstbus.c
b/gst/gstbus.c
index a1a008e0b36c339f367daf8b88acbd8ffc4528d4..7865079b05e9efb14336c4c8dc97530fc7914445 100644
(file)
--- a/
gst/gstbus.c
+++ b/
gst/gstbus.c
@@
-446,7
+446,7
@@
void
gst_bus_set_flushing (GstBus * bus, gboolean flushing)
{
GstMessage *message;
- GList *
l, *
message_list = NULL;
+ GList *message_list = NULL;
GST_OBJECT_LOCK (bus);
@@
-464,11
+464,7
@@
gst_bus_set_flushing (GstBus * bus, gboolean flushing)
GST_OBJECT_UNLOCK (bus);
- for (l = message_list; l; l = l->next) {
- message = GST_MESSAGE (l);
- gst_message_unref (message);
- }
- g_list_free (message_list);
+ g_list_free_full (message_list, (GDestroyNotify) gst_message_unref);
}
/**