summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-04-17 12:14:19 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-04-17 12:14:19 +0100
commit5f93f16b61c34b09f9ce3f1ab7bb8473a81b4d04 (patch)
tree18cb7f8e3fb15a3fa1cb8f44762e14379981d47d
parent02da386da89e06f6ab7335111848fb94bd358053 (diff)
ecore - proc env - fix values return NULL case - coverity
this fixes CID 1419857
-rw-r--r--src/lib/ecore/efl_core_proc_env.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/ecore/efl_core_proc_env.c b/src/lib/ecore/efl_core_proc_env.c
index 3b21015048..f693df25af 100644
--- a/src/lib/ecore/efl_core_proc_env.c
+++ b/src/lib/ecore/efl_core_proc_env.c
@@ -58,6 +58,8 @@ _sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd)
58 char **values; 58 char **values;
59 59
60 values = eina_str_split(*p, "=", 2); 60 values = eina_str_split(*p, "=", 2);
61 if (!values) break;
62
61 efl_core_env_set(obj, values[0], values[1]); 63 efl_core_env_set(obj, values[0], values[1]);
62 64
63 EINA_LIST_FOREACH(existing_keys, n, key) 65 EINA_LIST_FOREACH(existing_keys, n, key)
@@ -68,12 +70,8 @@ _sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd)
68 break; 70 break;
69 } 71 }
70 } 72 }
71 73 free(values[0]);
72 if (values) 74 free(values);
73 {
74 free(values[0]);
75 free(values);
76 }
77 } 75 }
78 } 76 }
79 EINA_LIST_FOREACH(existing_keys, n, key) 77 EINA_LIST_FOREACH(existing_keys, n, key)