diff --git a/src/lib/eina/eina_util.c b/src/lib/eina/eina_util.c index 7205a45799..1d329d2d2a 100644 --- a/src/lib/eina/eina_util.c +++ b/src/lib/eina/eina_util.c @@ -84,12 +84,14 @@ eina_environment_home_get(void) if (!getpwuid_r(geteuid(), &pwent, pwbuf, sizeof(pwbuf), &pwent2)) { if ((pwent2) && (pwent.pw_dir)) - home = strdup(pwent.pw_dir); + { + home = strdup(pwent.pw_dir); + return home; + } } - if (!home) home = strdup("/tmp"); - return home; - } # endif + home = "/tmp"; + } #endif home = strdup(home); return home;