mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 13:38:45 +02:00
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.
This commit is contained in:
parent
d33b4ef04e
commit
8d07bfd434
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue