boot-splash: fix memory leak in error path

If the splash key file fails to load, we don't free
the associated key file object.

This commit fixes that.
This commit is contained in:
Ray Strode 2018-10-15 21:04:47 -04:00
parent 4ff6d59d10
commit 310b63cd15

View file

@ -208,8 +208,10 @@ ply_boot_splash_load (ply_boot_splash_t *splash)
key_file = ply_key_file_new (splash->theme_path);
if (!ply_key_file_load (key_file))
if (!ply_key_file_load (key_file)) {
ply_key_file_free (key_file);
return false;
}
module_name = ply_key_file_get_value (key_file, "Plymouth Theme", "ModuleName");