eina_vpath: fix the memory leak

Summary:
 fix the memory leak
@fix

Reviewers: Jaehyun_Cho, bu5hm4n

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7081
This commit is contained in:
Taehyub Kim 2018-09-21 15:05:58 +09:00 committed by Jaehyun Cho
parent a6629d86c9
commit 54c68e445b
1 changed files with 7 additions and 3 deletions

View File

@ -160,12 +160,16 @@ _eina_vpath_interface_sys_init(void)
// $HOME / ~/ etc.
home = eina_environment_home_get();
if (!home)
home = _fallback_home_dir();
{
home = _fallback_home_dir();
_eina_vpath_data_add("home", home);
free(home);
}
else
_eina_vpath_data_add("home", home);
// tmp dir - system wide
tmp = eina_environment_tmp_get();
_eina_vpath_data_add("home", home);
_eina_vpath_data_add("tmp", tmp);
}