aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xi
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-02 14:11:38 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-02 14:11:38 +0200
commit1dbd3c888a3eee51db5303bd93e95b84999f5d31 (patch)
tree84db92271726b42b8c0864c8b7c77b2330566fc1 /nx-X11/programs/Xserver/Xi
parent279d37127db241a9ee685f6b671f51aa21a972ea (diff)
parente85808245810d0cc6918104deef25213d5f9e06c (diff)
downloadnx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.gz
nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.bz2
nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.zip
Merge branch 'sunweaver-pr/backport-Xorg-memory-handling' into 3.6.x
Attributes GH PR #159: https://github.com/ArcticaProject/nx-libs/pull/159 Reviewed by: Vadim Troshchinskiy <vadim@qindel.com> -- Fri, 01 Jul 2016 12:47:46 -0700
Diffstat (limited to 'nx-X11/programs/Xserver/Xi')
-rw-r--r--nx-X11/programs/Xserver/Xi/chgkbd.c2
-rw-r--r--nx-X11/programs/Xserver/Xi/chgptr.c4
-rw-r--r--nx-X11/programs/Xserver/Xi/exevents.c22
-rw-r--r--nx-X11/programs/Xserver/Xi/extinit.c2
-rw-r--r--nx-X11/programs/Xserver/Xi/getdctl.c4
-rw-r--r--nx-X11/programs/Xserver/Xi/getfctl.c4
-rw-r--r--nx-X11/programs/Xserver/Xi/getprop.c4
-rw-r--r--nx-X11/programs/Xserver/Xi/getselev.c4
-rw-r--r--nx-X11/programs/Xserver/Xi/listdev.c4
-rw-r--r--nx-X11/programs/Xserver/Xi/queryst.c4
10 files changed, 27 insertions, 27 deletions
diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.c b/nx-X11/programs/Xserver/Xi/chgkbd.c
index 136d257c6..0cf8a1c87 100644
--- a/nx-X11/programs/Xserver/Xi/chgkbd.c
+++ b/nx-X11/programs/Xserver/Xi/chgkbd.c
@@ -168,7 +168,7 @@ ProcXChangeKeyboardDevice (client)
if (df->traceSize != xf->traceSize)
{
Must_have_memory = TRUE; /* XXX */
- df->trace = (WindowPtr *) xrealloc(df->trace,
+ df->trace = (WindowPtr *) realloc(df->trace,
xf->traceSize * sizeof(WindowPtr));
Must_have_memory = FALSE; /* XXX */
}
diff --git a/nx-X11/programs/Xserver/Xi/chgptr.c b/nx-X11/programs/Xserver/Xi/chgptr.c
index 4877fcc84..2bbd7bc37 100644
--- a/nx-X11/programs/Xserver/Xi/chgptr.c
+++ b/nx-X11/programs/Xserver/Xi/chgptr.c
@@ -185,8 +185,8 @@ void
DeleteFocusClassDeviceStruct(dev)
DeviceIntPtr dev;
{
- xfree(dev->focus->trace);
- xfree(dev->focus);
+ free(dev->focus->trace);
+ free(dev->focus);
dev->focus = NULL;
}
diff --git a/nx-X11/programs/Xserver/Xi/exevents.c b/nx-X11/programs/Xserver/Xi/exevents.c
index ce5fe9ec9..85abd4fee 100644
--- a/nx-X11/programs/Xserver/Xi/exevents.c
+++ b/nx-X11/programs/Xserver/Xi/exevents.c
@@ -302,7 +302,7 @@ InitProximityClassDeviceStruct( DeviceIntPtr dev)
{
register ProximityClassPtr proxc;
- proxc = (ProximityClassPtr)xalloc(sizeof(ProximityClassRec));
+ proxc = (ProximityClassPtr)malloc(sizeof(ProximityClassRec));
if (!proxc)
return FALSE;
dev->proximity = proxc;
@@ -460,7 +460,7 @@ DeviceFocusEvent(dev, type, mode, detail, pWin)
}
}
- sev = ev = (deviceStateNotify *) xalloc(evcount * sizeof(xEvent));
+ sev = ev = (deviceStateNotify *) malloc(evcount * sizeof(xEvent));
FixDeviceStateNotify (dev, ev, NULL, NULL, NULL, first);
if (b != NULL) {
@@ -515,7 +515,7 @@ DeviceFocusEvent(dev, type, mode, detail, pWin)
(void) DeliverEventsToWindow(pWin, (xEvent *)sev, evcount,
DeviceStateNotifyMask, NullGrab, dev->id);
- xfree (sev);
+ free (sev);
}
}
@@ -741,7 +741,7 @@ AddExtensionClient (pWin, client, mask, mskidx)
if (!pWin->optional && !MakeWindowOptional (pWin))
return BadAlloc;
- others = (InputClients *) xalloc(sizeof(InputClients));
+ others = (InputClients *) malloc(sizeof(InputClients));
if (!others)
return BadAlloc;
if (!pWin->optional->inputMasks && !MakeInputMasks (pWin))
@@ -763,7 +763,7 @@ MakeInputMasks (pWin)
struct _OtherInputMasks *imasks;
imasks = (struct _OtherInputMasks *)
- xalloc (sizeof (struct _OtherInputMasks));
+ malloc (sizeof (struct _OtherInputMasks));
if (!imasks)
return FALSE;
bzero((char *) imasks, sizeof (struct _OtherInputMasks));
@@ -830,17 +830,17 @@ InputClientGone(pWin, id)
if (prev)
{
prev->next = other->next;
- xfree(other);
+ free(other);
}
else if (!(other->next))
{
if (ShouldFreeInputMasks(pWin, TRUE))
{
wOtherInputMasks(pWin)->inputClients = other->next;
- xfree(wOtherInputMasks(pWin));
+ free(wOtherInputMasks(pWin));
pWin->optional->inputMasks = (OtherInputMasks *) NULL;
CheckWindowOptionalNeed (pWin);
- xfree(other);
+ free(other);
}
else
{
@@ -853,7 +853,7 @@ InputClientGone(pWin, id)
else
{
wOtherInputMasks(pWin)->inputClients = other->next;
- xfree(other);
+ free(other);
}
RecalculateDeviceDeliverableEvents(pWin);
return(Success);
@@ -1027,12 +1027,12 @@ SetModifierMapping(client, dev, len, rlen, numKeyPerModifier, inputMap, k)
* list of keycodes.
*/
if (inputMapLen) {
- map = (KeyCode *)xalloc(inputMapLen);
+ map = (KeyCode *)malloc(inputMapLen);
if (!map)
return BadAlloc;
}
if ((*k)->modifierKeyMap)
- xfree((*k)->modifierKeyMap);
+ free((*k)->modifierKeyMap);
if (inputMapLen) {
(*k)->modifierKeyMap = map;
memmove((char *)(*k)->modifierKeyMap, (char *)inputMap, inputMapLen);
diff --git a/nx-X11/programs/Xserver/Xi/extinit.c b/nx-X11/programs/Xserver/Xi/extinit.c
index 81f5ca551..d74ac5dc7 100644
--- a/nx-X11/programs/Xserver/Xi/extinit.c
+++ b/nx-X11/programs/Xserver/Xi/extinit.c
@@ -872,7 +872,7 @@ AssignTypeAndName (dev, type, name)
char *name;
{
dev->type = type;
- dev->name = (char *) xalloc(strlen(name)+1);
+ dev->name = (char *) malloc(strlen(name)+1);
strcpy (dev->name, name);
}
diff --git a/nx-X11/programs/Xserver/Xi/getdctl.c b/nx-X11/programs/Xserver/Xi/getdctl.c
index d8c310d92..1161e5aef 100644
--- a/nx-X11/programs/Xserver/Xi/getdctl.c
+++ b/nx-X11/programs/Xserver/Xi/getdctl.c
@@ -139,7 +139,7 @@ ProcXGetDeviceControl(client)
return Success;
}
- buf = (char *) xalloc (total_length);
+ buf = (char *) malloc (total_length);
if (!buf)
{
SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
@@ -161,7 +161,7 @@ ProcXGetDeviceControl(client)
rep.length = (total_length+3) >> 2;
WriteReplyToClient(client, sizeof(xGetDeviceControlReply), &rep);
WriteToClient(client, total_length, savbuf);
- xfree (savbuf);
+ free (savbuf);
return Success;
}
diff --git a/nx-X11/programs/Xserver/Xi/getfctl.c b/nx-X11/programs/Xserver/Xi/getfctl.c
index c6cb8457c..bc92784d3 100644
--- a/nx-X11/programs/Xserver/Xi/getfctl.c
+++ b/nx-X11/programs/Xserver/Xi/getfctl.c
@@ -165,7 +165,7 @@ ProcXGetFeedbackControl(client)
return Success;
}
- buf = (char *) xalloc (total_length);
+ buf = (char *) malloc (total_length);
if (!buf)
{
SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0,
@@ -190,7 +190,7 @@ ProcXGetFeedbackControl(client)
rep.length = (total_length+3) >> 2;
WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep);
WriteToClient(client, total_length, savbuf);
- xfree (savbuf);
+ free (savbuf);
return Success;
}
diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c
index ac37617ec..42403b0e5 100644
--- a/nx-X11/programs/Xserver/Xi/getprop.c
+++ b/nx-X11/programs/Xserver/Xi/getprop.c
@@ -137,7 +137,7 @@ ProcXGetDeviceDontPropagateList (client)
if (count)
{
rep.count = count;
- buf = (XEventClass *) xalloc (rep.count * sizeof(XEventClass));
+ buf = (XEventClass *) malloc (rep.count * sizeof(XEventClass));
rep.length = (rep.count * sizeof (XEventClass) + 3) >> 2;
tbuf = buf;
@@ -154,7 +154,7 @@ ProcXGetDeviceDontPropagateList (client)
{
client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write;
WriteSwappedDataToClient( client, count * sizeof(XEventClass), buf);
- xfree (buf);
+ free (buf);
}
return Success;
}
diff --git a/nx-X11/programs/Xserver/Xi/getselev.c b/nx-X11/programs/Xserver/Xi/getselev.c
index 7cd97b5ef..8abea78d4 100644
--- a/nx-X11/programs/Xserver/Xi/getselev.c
+++ b/nx-X11/programs/Xserver/Xi/getselev.c
@@ -149,7 +149,7 @@ ProcXGetSelectedExtensionEvents(client)
total_length = (rep.all_clients_count + rep.this_client_count) *
sizeof (XEventClass);
rep.length = (total_length + 3) >> 2;
- buf = (XEventClass *) xalloc (total_length);
+ buf = (XEventClass *) malloc (total_length);
tclient = buf;
aclient = buf + rep.this_client_count;
@@ -168,7 +168,7 @@ ProcXGetSelectedExtensionEvents(client)
{
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient( client, total_length, buf);
- xfree (buf);
+ free (buf);
}
return Success;
}
diff --git a/nx-X11/programs/Xserver/Xi/listdev.c b/nx-X11/programs/Xserver/Xi/listdev.c
index e99584d0e..7f3b49e89 100644
--- a/nx-X11/programs/Xserver/Xi/listdev.c
+++ b/nx-X11/programs/Xserver/Xi/listdev.c
@@ -129,7 +129,7 @@ ProcXListInputDevices (client)
SizeDeviceInfo (d, &namesize, &size);
total_length = numdevs * sizeof (xDeviceInfo) + size + namesize;
- devbuf = (char *) xcalloc (1, total_length);
+ devbuf = (char *) calloc (1, total_length);
classbuf = devbuf + (numdevs * sizeof (xDeviceInfo));
namebuf = classbuf + size;
savbuf = devbuf;
@@ -144,7 +144,7 @@ ProcXListInputDevices (client)
rep.length = (total_length + 3) >> 2;
WriteReplyToClient (client, sizeof (xListInputDevicesReply), &rep);
WriteToClient(client, total_length, savbuf);
- xfree (savbuf);
+ free (savbuf);
return Success;
}
diff --git a/nx-X11/programs/Xserver/Xi/queryst.c b/nx-X11/programs/Xserver/Xi/queryst.c
index af2b4301d..a590aa0e1 100644
--- a/nx-X11/programs/Xserver/Xi/queryst.c
+++ b/nx-X11/programs/Xserver/Xi/queryst.c
@@ -135,7 +135,7 @@ ProcXQueryDeviceState(client)
(v->numAxes * sizeof(int)));
num_classes++;
}
- buf = (char *) xalloc (total_length);
+ buf = (char *) malloc (total_length);
if (!buf)
{
SendErrorToClient(client, IReqCode, X_QueryDeviceState, 0,
@@ -190,7 +190,7 @@ ProcXQueryDeviceState(client)
WriteReplyToClient (client, sizeof(xQueryDeviceStateReply), &rep);
if (total_length > 0)
WriteToClient (client, total_length, savbuf);
- xfree (savbuf);
+ free (savbuf);
return Success;
}