gstinfo: fix infinite loop in gst_debug_unset_threshold_for_name()
authorJason Litzinger <jlitzinger@control4.com>
Wed, 22 Apr 2015 18:03:33 +0000 (12:03 -0600)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 23 Apr 2015 10:20:25 +0000 (11:20 +0100)
Ensure iterator is advanced. The current list iteration code only
advances the iterator (walk) if a match is found, which results
in an infinite loop when more than one entry exists in the list.

https://bugzilla.gnome.org/show_bug.cgi?id=748321

gst/gstinfo.c

index f210233..643ce88 100644 (file)
@@ -1526,6 +1526,8 @@ gst_debug_unset_threshold_for_name (const gchar * name)
       g_slice_free (LevelNameEntry, entry);
       g_slist_free_1 (walk);
       walk = __level_name;
+    } else {
+      walk = g_slist_next (walk);
     }
   }
   g_mutex_unlock (&__level_name_mutex);