summaryrefslogtreecommitdiffstats
path: root/x11vnc/cleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/cleanup.c')
-rw-r--r--x11vnc/cleanup.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/x11vnc/cleanup.c b/x11vnc/cleanup.c
index 232311c..60db819 100644
--- a/x11vnc/cleanup.c
+++ b/x11vnc/cleanup.c
@@ -190,6 +190,15 @@ void clean_up_exit(int ret) {
shutdown_uinput();
+ if (unix_sock) {
+ if (unix_sock_fd >= 0) {
+ rfbLog("deleting unix sock: %s\n", unix_sock);
+ close(unix_sock_fd);
+ unix_sock_fd = -1;
+ unlink(unix_sock);
+ }
+ }
+
if (! dpy) { /* raw_rb hack */
if (rm_flagfile) {
unlink(rm_flagfile);