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
c0fa42fcdd
commit
05f00710f2
|
@ -80,7 +80,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()) &&
|
||||
|
@ -94,6 +95,7 @@ e_ipc_init(void)
|
|||
if (_e_ipc_server) break;
|
||||
}
|
||||
}
|
||||
retry:
|
||||
id1 = rand();
|
||||
}
|
||||
if (!_e_ipc_server)
|
||||
|
|
Loading…
Reference in New Issue