aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c9
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pointer.c11
2 files changed, 17 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 46686b754..c8038955b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -1025,11 +1025,18 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
break;
case DEVICE_CLOSE:
-
#ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Called for [DEVICE_CLOSE].\n");
#endif
+ for (int i = 0; i < pDev->nPrivates; i++)
+ {
+ free(pDev->devPrivates[i].ptr);
+ pDev->devPrivates[i].ptr = NULL;
+ }
+ free(pDev->devPrivates);
+ pDev->devPrivates = NULL;
+
break;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c
index c59230724..85d286b96 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c
@@ -40,7 +40,7 @@ is" without express or implied warranty.
#include "X.h"
#include "Xproto.h"
#include "screenint.h"
-#include "input.h"
+#include "inputstr.h"
#include "misc.h"
#include "scrnintstr.h"
#include "servermd.h"
@@ -162,11 +162,18 @@ int nxagentPointerProc(DeviceIntPtr pDev, int onoff)
break;
case DEVICE_CLOSE:
-
#ifdef TEST
fprintf(stderr, "nxagentPointerProc: Called for [DEVICE_CLOSE].\n");
#endif
+ for (int i = 0; i < pDev->nPrivates; i++)
+ {
+ free(pDev->devPrivates[i].ptr);
+ pDev->devPrivates[i].ptr = NULL;
+ }
+ free(pDev->devPrivates);
+ pDev->devPrivates = NULL;
+
break;
}