ipc: make use of |socket_name| in the error paths too

This patch changes CreateServerUnixDomainSocket() function to reuse
|socket_name| variable in the error paths instead of using socket_path.value().
As |socket_name| variable was made at the top of this function exactly
for that, to avoid having to use socket_path.value().

Also declare |socket_dir| closer to the path where it is actually used.

BUG=None
TEST=ipc_tests
[email protected]

Review URL: https://codereview.chromium.org/1663583005

Cr-Commit-Position: refs/heads/master@{#374258}
1 file changed