From: Ray Strode Date: Tue, 16 Oct 2018 01:04:47 +0000 (-0400) Subject: boot-splash: fix memory leak in error path X-Git-Tag: 0.9.4~2^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=310b63cd154552605f380fa2743b08f6cd63bcdd;p=thirdparty%2Fplymouth.git 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. --- diff --git a/src/libply-splash-core/ply-boot-splash.c b/src/libply-splash-core/ply-boot-splash.c index 2e295f42..54c76965 100644 --- a/src/libply-splash-core/ply-boot-splash.c +++ b/src/libply-splash-core/ply-boot-splash.c @@ -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");