aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr/rrscreen.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/rrscreen.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/rrscreen.c')
-rw-r--r--nx-X11/programs/Xserver/randr/rrscreen.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrscreen.c b/nx-X11/programs/Xserver/randr/rrscreen.c
index af54d66f5..017ff0143 100644
--- a/nx-X11/programs/Xserver/randr/rrscreen.c
+++ b/nx-X11/programs/Xserver/randr/rrscreen.c
@@ -334,7 +334,7 @@ ProcRRSetScreenSize(ClientPtr client)
for (j = 0; j < num_modes; j++) \
total_name_len += modes[j]->mode.nameLength; \
total_modes += num_modes; \
- xfree(modes); \
+ free(modes); \
} while(0)
static inline void
@@ -388,7 +388,7 @@ swap_modeinfos(xRRModeInfo * modeinfos, int i)
names += mode->mode.nameLength; \
mode_count++; \
} \
- xfree(modes); \
+ free(modes); \
} \
} while (0)
@@ -456,7 +456,7 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen)
extraLen = rep.length << 2;
if (extraLen) {
- extra = xalloc(extraLen);
+ extra = malloc(extraLen);
if (!extra) {
return BadAlloc;
}
@@ -504,7 +504,7 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen)
WriteToClient(client, sizeof(xRRGetScreenResourcesReply), (char *) &rep);
if (extraLen) {
WriteToClient(client, extraLen, (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -595,9 +595,9 @@ rrGetScreenResources(ClientPtr client, Bool query)
extraLen = rep.length << 2;
if (extraLen) {
- extra = xalloc(extraLen);
+ extra = malloc(extraLen);
if (!extra) {
- xfree(modes);
+ free(modes);
return BadAlloc;
}
}
@@ -655,7 +655,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
memcpy(names, mode->name, mode->mode.nameLength);
names += mode->mode.nameLength;
}
- xfree(modes);
+ free(modes);
assert(bytes_to_int32((char *) names - (char *) extra) == rep.length);
}
@@ -673,7 +673,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
(char *) (char *) &rep);
if (extraLen) {
WriteToClient(client, extraLen, (char *) (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -714,7 +714,7 @@ RR10GetData(ScreenPtr pScreen, RROutputPtr output)
Bool *used;
/* Make sure there is plenty of space for any combination */
- data = xalloc(sizeof(RR10DataRec) +
+ data = malloc(sizeof(RR10DataRec) +
sizeof(RRScreenSize) * nmode +
sizeof(RRScreenRate) * nmode + sizeof(Bool) * nmode);
if (!data)
@@ -874,9 +874,9 @@ ProcRRGetScreenInfo(ClientPtr client)
extraLen += rep.nrateEnts * sizeof(CARD16);
if (extraLen) {
- extra = (CARD8 *) xalloc(extraLen);
+ extra = (CARD8 *) malloc(extraLen);
if (!extra) {
- xfree(pData);
+ free(pData);
return BadAlloc;
}
}
@@ -916,7 +916,7 @@ ProcRRGetScreenInfo(ClientPtr client)
}
}
}
- xfree(pData);
+ free(pData);
data8 = (CARD8 *) rates;
@@ -939,7 +939,7 @@ ProcRRGetScreenInfo(ClientPtr client)
WriteToClient(client, sizeof(xRRGetScreenInfoReply), (char *) &rep);
if (extraLen) {
WriteToClient(client, extraLen, (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -1035,7 +1035,7 @@ ProcRRSetScreenConfig(ClientPtr client)
* Invalid size ID
*/
client->errorValue = stuff->sizeID;
- xfree(pData);
+ free(pData);
return BadValue;
}
pSize = &pData->sizes[stuff->sizeID];
@@ -1057,7 +1057,7 @@ ProcRRSetScreenConfig(ClientPtr client)
* Invalid rotation
*/
client->errorValue = stuff->rotation;
- xfree(pData);
+ free(pData);
return BadValue;
}
@@ -1066,7 +1066,7 @@ ProcRRSetScreenConfig(ClientPtr client)
* requested rotation or reflection not supported by screen
*/
client->errorValue = stuff->rotation;
- xfree(pData);
+ free(pData);
return BadMatch;
}
@@ -1088,7 +1088,7 @@ ProcRRSetScreenConfig(ClientPtr client)
* Invalid rate
*/
client->errorValue = rate;
- xfree(pData);
+ free(pData);
return BadValue;
}
mode = pSize->pRates[i].mode;
@@ -1113,12 +1113,12 @@ ProcRRSetScreenConfig(ClientPtr client)
height = mode->mode.height;
if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
client->errorValue = width;
- xfree(pData);
+ free(pData);
return BadValue;
}
if (height < pScrPriv->minHeight || pScrPriv->maxHeight < height) {
client->errorValue = height;
- xfree(pData);
+ free(pData);
return BadValue;
}
@@ -1159,7 +1159,7 @@ ProcRRSetScreenConfig(ClientPtr client)
sendReply:
- xfree(pData);
+ free(pData);
rep = (xRRSetScreenConfigReply) {
.type = X_Reply,
@@ -1202,7 +1202,7 @@ RR10CurrentSizeID(ScreenPtr pScreen)
sizeID = (CARD16) i;
break;
}
- xfree(data);
+ free(data);
}
}
return sizeID;