aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWonki Kim <wonki_.kim@samsung.com>2019-09-18 08:21:02 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-09-18 08:21:02 -0400
commit726b0ee9208231c22e2ca0dade26ef650d16d8b0 (patch)
treed0b647d09736f7682ebfade27de2c3349265fa72
parentRevert "efl_io_model: remove custom counting logic" (diff)
downloadefl-726b0ee9208231c22e2ca0dade26ef650d16d8b0.tar.gz
elm_config: fix to check if eet_open fails
Summary: this patch adds a guard block in case of failure of eet_open(). Reviewers: bu5hm4n, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9987
-rw-r--r--src/lib/elementary/elm_config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 0e25747d0f..bbc6b9f668 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1733,6 +1733,11 @@ _config_system_load(void)
EINA_SAFETY_ON_FALSE_RETURN_VAL(eet_data_undump(ef, "config", embedded_config, strlen(embedded_config)-1, EINA_FALSE), NULL);
eet_close(ef);
ef = eet_open(tmp, EET_FILE_MODE_READ);
+ if (!ef)
+ {
+ ERR("Failed to load a fallback config file.");
+ return NULL;
+ }
cfg = eet_data_read(ef, _config_edd, "config");
eet_close(ef);
}