plymouth/boot-splash-fix-memory-leak-in-error-path.patch
songnannan b411777e51 init
2019-12-28 09:27:13 +08:00

33 lines
1.0 KiB
Diff

From 310b63cd154552605f380fa2743b08f6cd63bcdd Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 15 Oct 2018 21:04:47 -0400
Subject: [PATCH 049/142] 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.
---
src/libply-splash-core/ply-boot-splash.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/libply-splash-core/ply-boot-splash.c b/src/libply-splash-core/ply-boot-splash.c
index 2e295f4..54c7696 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");
--
2.7.4