diff options
Diffstat (limited to 'x11vnc/cleanup.c')
-rw-r--r-- | x11vnc/cleanup.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/x11vnc/cleanup.c b/x11vnc/cleanup.c index 3a584bb..e290977 100644 --- a/x11vnc/cleanup.c +++ b/x11vnc/cleanup.c @@ -30,7 +30,7 @@ XErrorEvent *trapped_xerror_event; int crash_debug = 0; void clean_shm(int quick); -void clean_up_exit (int ret); +void clean_up_exit(int ret); int trap_xerror(Display *d, XErrorEvent *error); int trap_xioerror(Display *d); int trap_getimage_xerror(Display *d, XErrorEvent *error); @@ -110,7 +110,7 @@ static void clean_icon_mode(void) { /* * Normal exiting */ -void clean_up_exit (int ret) { +void clean_up_exit(int ret) { static int depth = 0; exit_flag = 1; @@ -150,6 +150,11 @@ void clean_up_exit (int ret) { } #endif + if (pipeinput_fh != NULL) { + pclose(pipeinput_fh); + pipeinput_fh = NULL; + } + if (! dpy) exit(ret); /* raw_rb hack */ /* X keyboard cleanups */ |