forked from enlightenment/enlightenment
Check return value from mkdir
If mkdir fails, no need to stat. Fixes CID 1039963
This commit is contained in:
parent
a6f78e8dab
commit
fb3a692233
|
@ -55,7 +55,8 @@ e_ipc_init(void)
|
|||
|
||||
snprintf(buf, sizeof(buf), "%s/e-%s@%x",
|
||||
base, user, id1);
|
||||
mkdir(buf, S_IRWXU);
|
||||
if (mkdir(buf, S_IRWXU) < 0)
|
||||
goto retry;
|
||||
if (stat(buf, &st) == 0)
|
||||
{
|
||||
if ((st.st_uid == getuid()) &&
|
||||
|
@ -69,6 +70,7 @@ e_ipc_init(void)
|
|||
if (_e_ipc_server) break;
|
||||
}
|
||||
}
|
||||
retry:
|
||||
id1 = rand();
|
||||
}
|
||||
if (!_e_ipc_server) return 0;
|
||||
|
|
Loading…
Reference in New Issue