mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 08:54:38 +09:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user