summaryrefslogtreecommitdiff
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 09:20:09 -0400
commit75f3f46a0f1eefcaf79687ee03a1985a4de05141 (patch)
tree7cc7c26136ce9b4aecb5b9eed2275ed1ff2f7112
parentcb28716a225ff5750b9c2f584dd91ef5a11a69c1 (diff)
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 9973dbd..65fe712 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1704,6 +1704,11 @@ _config_system_load(void)
1704 EINA_SAFETY_ON_FALSE_RETURN_VAL(eet_data_undump(ef, "config", embedded_config, strlen(embedded_config)-1, EINA_FALSE), NULL); 1704 EINA_SAFETY_ON_FALSE_RETURN_VAL(eet_data_undump(ef, "config", embedded_config, strlen(embedded_config)-1, EINA_FALSE), NULL);
1705 eet_close(ef); 1705 eet_close(ef);
1706 ef = eet_open(tmp, EET_FILE_MODE_READ); 1706 ef = eet_open(tmp, EET_FILE_MODE_READ);
1707 if (!ef)
1708 {
1709 ERR("Failed to load a fallback config file.");
1710 return NULL;
1711 }
1707 cfg = eet_data_read(ef, _config_edd, "config"); 1712 cfg = eet_data_read(ef, _config_edd, "config");
1708 eet_close(ef); 1713 eet_close(ef);
1709 } 1714 }