Unlink file after binding to it.
When unlinking the file before binding, a new entry is created in the file system after binding. This is not desireable, so unlink it after binding to remove the temporary file after the process closes.
This commit is contained in:
parent
4592deee72
commit
884e87fde4
@ -185,9 +185,9 @@ static BOOL freerdp_listener_open_local(freerdp_listener* instance, const char*
|
||||
|
||||
addr.sun_family = AF_UNIX;
|
||||
strncpy(addr.sun_path, path, sizeof(addr.sun_path));
|
||||
unlink(path);
|
||||
|
||||
status = _bind(sockfd, (struct sockaddr*) &addr, sizeof(addr));
|
||||
unlink(path);
|
||||
|
||||
if (status != 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user