projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4592dee
)
Unlink file after binding to it.
author
Armin Novak
<armin.novak@thincast.com>
Mon, 25 Sep 2017 08:35:24 +0000
(10:35 +0200)
committer
Armin Novak
<armin.novak@thincast.com>
Mon, 25 Sep 2017 08:35:24 +0000
(10:35 +0200)
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.
libfreerdp/core/listener.c
patch
|
blob
|
history
diff --git
a/libfreerdp/core/listener.c
b/libfreerdp/core/listener.c
index
6fb48c8
..
7dade73
100644
(file)
--- a/
libfreerdp/core/listener.c
+++ b/
libfreerdp/core/listener.c
@@
-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)
{