aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr/rroutput.c
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/randr/rroutput.c
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/randr/rroutput.c')
-rw-r--r--nx-X11/programs/Xserver/randr/rroutput.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/nx-X11/programs/Xserver/randr/rroutput.c b/nx-X11/programs/Xserver/randr/rroutput.c
index 2628fabb0..4a3d32a12 100644
--- a/nx-X11/programs/Xserver/randr/rroutput.c
+++ b/nx-X11/programs/Xserver/randr/rroutput.c
@@ -79,17 +79,17 @@ RROutputCreate(ScreenPtr pScreen,
outputs = reallocarray(pScrPriv->outputs,
pScrPriv->numOutputs + 1, sizeof(RROutputPtr));
#else /* !defined(NXAGENT_SERVER) */
- outputs = xrealloc(pScrPriv->outputs,
+ outputs = realloc(pScrPriv->outputs,
(pScrPriv->numOutputs + 1) * sizeof(RROutputPtr));
#endif /* !defined(NXAGENT_SERVER) */
else
- outputs = xalloc(sizeof(RROutputPtr));
+ outputs = malloc(sizeof(RROutputPtr));
if (!outputs)
return FALSE;
pScrPriv->outputs = outputs;
- output = xalloc(sizeof(RROutputRec) + nameLength + 1);
+ output = malloc(sizeof(RROutputRec) + nameLength + 1);
if (!output)
return NULL;
output->id = FakeClientID(0);
@@ -147,14 +147,14 @@ RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones)
#ifndef NXAGENT_SERVER
newClones = xallocarray(numClones, sizeof(RROutputPtr));
#else /* !defined(NXAGENT_SERVER) */
- newClones = xalloc(numClones * sizeof(RROutputPtr));
+ newClones = malloc(numClones * sizeof(RROutputPtr));
#endif /* !defined(NXAGENT_SERVER) */
if (!newClones)
return FALSE;
}
else
newClones = NULL;
- xfree(output->clones);
+ free(output->clones);
memcpy(newClones, clones, numClones * sizeof(RROutputPtr));
output->clones = newClones;
output->numClones = numClones;
@@ -184,7 +184,7 @@ RROutputSetModes(RROutputPtr output,
#ifndef NXAGENT_SERVER
newModes = xallocarray(numModes, sizeof(RRModePtr));
#else /* !defined(NXAGENT_SERVER) */
- newModes = xalloc(numModes * sizeof(RRModePtr));
+ newModes = malloc(numModes * sizeof(RRModePtr));
#endif /* !defined(NXAGENT_SERVER) */
if (!newModes)
return FALSE;
@@ -194,7 +194,7 @@ RROutputSetModes(RROutputPtr output,
if (output->modes) {
for (i = 0; i < output->numModes; i++)
RRModeDestroy(output->modes[i]);
- xfree(output->modes);
+ free(output->modes);
}
memcpy(newModes, modes, numModes * sizeof(RRModePtr));
output->modes = newModes;
@@ -232,11 +232,11 @@ RROutputAddUserMode(RROutputPtr output, RRModePtr mode)
newModes = reallocarray(output->userModes,
output->numUserModes + 1, sizeof(RRModePtr));
#else /* !defined(NXAGENT_SERVER) */
- newModes = xrealloc(output->userModes,
+ newModes = realloc(output->userModes,
(output->numUserModes + 1) * sizeof(RRModePtr));
#endif /* !defined(NXAGENT_SERVER) */
else
- newModes = xalloc(sizeof(RRModePtr));
+ newModes = malloc(sizeof(RRModePtr));
if (!newModes)
return BadAlloc;
@@ -292,14 +292,14 @@ RROutputSetCrtcs(RROutputPtr output, RRCrtcPtr * crtcs, int numCrtcs)
#ifndef NXAGENT_SERVER
newCrtcs = xallocarray(numCrtcs, sizeof(RRCrtcPtr));
#else /* !defined(NXAGENT_SERVER) */
- newCrtcs = xalloc(numCrtcs * sizeof(RRCrtcPtr));
+ newCrtcs = malloc(numCrtcs * sizeof(RRCrtcPtr));
#endif /* !defined(NXAGENT_SERVER) */
if (!newCrtcs)
return FALSE;
}
else
newCrtcs = NULL;
- xfree(output->crtcs);
+ free(output->crtcs);
memcpy(newCrtcs, crtcs, numCrtcs * sizeof(RRCrtcPtr));
output->crtcs = newCrtcs;
output->numCrtcs = numCrtcs;
@@ -404,17 +404,17 @@ RROutputDestroyResource(void *value, XID pid)
if (output->modes) {
for (m = 0; m < output->numModes; m++)
RRModeDestroy(output->modes[m]);
- xfree(output->modes);
+ free(output->modes);
}
for (m = 0; m < output->numUserModes; m++)
RRModeDestroy(output->userModes[m]);
- xfree(output->userModes);
+ free(output->userModes);
- xfree(output->crtcs);
- xfree(output->clones);
+ free(output->crtcs);
+ free(output->clones);
RRDeleteAllOutputProperties(output);
- xfree(output);
+ free(output);
return 1;
}
@@ -494,7 +494,7 @@ ProcRRGetOutputInfo(ClientPtr client)
if (extraLen) {
rep.length += bytes_to_int32(extraLen);
- extra = xalloc(extraLen);
+ extra = malloc(extraLen);
if (!extra)
return BadAlloc;
}
@@ -541,7 +541,7 @@ ProcRRGetOutputInfo(ClientPtr client)
WriteToClient(client, sizeof(xRRGetOutputInfoReply), (char *) &rep);
if (extraLen) {
WriteToClient(client, extraLen, (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;