summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2018-09-21 03:11:24 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-09-21 09:27:55 +0200
commitfe036fd67f3b6d90021c71b981cb42f15264972a (patch)
tree1269d4a7f309ae1e9b0b02fd10140e454b060fcc /src/lib/eina
parent6a8f2ce86316be8ce2d7f856706822bd92338cec (diff)
eina_vpath_vdg: free locally allocated memory before return
The eina_vpath_resolve could allocate memory and return it. But the eina_xdg_env_init does not release it. *Detected by static analysis with the Coverity Differential Revision: https://phab.enlightenment.org/D7066
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_vpath_xdg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/eina/eina_vpath_xdg.c b/src/lib/eina/eina_vpath_xdg.c
index 6a1d4d8248..2d533040fa 100644
--- a/src/lib/eina/eina_vpath_xdg.c
+++ b/src/lib/eina/eina_vpath_xdg.c
@@ -15,10 +15,10 @@ eina_xdg_env_init(void)
15{ 15{
16 char buf[PATH_MAX]; 16 char buf[PATH_MAX];
17 char *s; 17 char *s;
18 const char *home; 18 char home[PATH_MAX];
19 Eina_Vpath_Interface_User user; 19 Eina_Vpath_Interface_User user;
20 20
21 home = eina_vpath_resolve("(:home:)/"); 21 eina_vpath_resolve_snprintf(home, sizeof(home), "(:home:)/");
22 22
23 memset(&user, 0, sizeof(Eina_Vpath_Interface_User)); 23 memset(&user, 0, sizeof(Eina_Vpath_Interface_User));
24 24