From: Ray Strode Date: Thu, 24 Sep 2015 19:55:08 +0000 (-0400) Subject: plugins: free views that can't load X-Git-Tag: 0.9.3~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d07bfd434f2f37f6e7e4ed6d165446cc6884f98;p=thirdparty%2Fplymouth.git plugins: free views that can't load Trying to use an unloaded view can lead to crashes. If a view can't be loaded, free it right away. --- diff --git a/src/plugins/splash/fade-throbber/plugin.c b/src/plugins/splash/fade-throbber/plugin.c index 00410dea..aba2cc62 100644 --- a/src/plugins/splash/fade-throbber/plugin.c +++ b/src/plugins/splash/fade-throbber/plugin.c @@ -295,8 +295,12 @@ load_views (ply_boot_splash_plugin_t *plugin) view = ply_list_node_get_data (node); next_node = ply_list_get_next_node (plugin->views, node); - if (view_load (view)) + if (view_load (view)) { view_loaded = true; + } else { + ply_list_remove_node (plugin->views, node); + view_free (view); + } node = next_node; }