aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr/rrproviderproperty.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/rrproviderproperty.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/rrproviderproperty.c')
-rw-r--r--nx-X11/programs/Xserver/randr/rrproviderproperty.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrproviderproperty.c b/nx-X11/programs/Xserver/randr/rrproviderproperty.c
index a68a94ff2..b7ba8ab53 100644
--- a/nx-X11/programs/Xserver/randr/rrproviderproperty.c
+++ b/nx-X11/programs/Xserver/randr/rrproviderproperty.c
@@ -60,10 +60,10 @@ RRDeliverPropertyEvent(ScreenPtr pScreen, xEvent *event)
static void
RRDestroyProviderProperty(RRPropertyPtr prop)
{
- xfree(prop->valid_values);
- xfree(prop->current.data);
- xfree(prop->pending.data);
- xfree(prop);
+ free(prop->valid_values);
+ free(prop->current.data);
+ free(prop->pending.data);
+ free(prop);
}
static void
@@ -108,7 +108,7 @@ RRCreateProviderProperty(Atom property)
{
RRPropertyPtr prop;
- prop = (RRPropertyPtr) xalloc(sizeof(RRPropertyRec));
+ prop = (RRPropertyPtr) malloc(sizeof(RRPropertyRec));
if (!prop)
return NULL;
prop->next = NULL;
@@ -185,7 +185,7 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
void *new_data = NULL, *old_data = NULL;
total_size = total_len * size_in_bytes;
- new_value.data = (void *) xalloc(total_size);
+ new_value.data = (void *) malloc(total_size);
if (!new_value.data && total_size) {
if (add)
RRDestroyProviderProperty(prop);
@@ -222,10 +222,10 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
prop->propertyName, &new_value)) {
if (add)
RRDestroyProviderProperty(prop);
- xfree(new_value.data);
+ free(new_value.data);
return BadValue;
}
- xfree(prop_value->data);
+ free(prop_value->data);
*prop_value = new_value;
}
@@ -357,7 +357,7 @@ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
#ifndef NXAGENT_SERVER
new_values = xallocarray(num_values, sizeof(INT32));
#else /* !defined(NXAGENT_SERVER) */
- new_values = xalloc(num_values * sizeof(INT32));
+ new_values = malloc(num_values * sizeof(INT32));
#endif /* !defined(NXAGENT_SERVER) */
if (!new_values && num_values) {
@@ -373,7 +373,7 @@ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
* loses any pending values
*/
if (prop->is_pending && !pending) {
- xfree(prop->pending.data);
+ free(prop->pending.data);
RRInitProviderPropertyValue(&prop->pending);
}
@@ -381,7 +381,7 @@ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
prop->range = range;
prop->immutable = immutable;
prop->num_valid = num_values;
- xfree(prop->valid_values);
+ free(prop->valid_values);
prop->valid_values = new_values;
if (add) {
@@ -413,7 +413,7 @@ ProcRRListProviderProperties(ClientPtr client)
#ifndef NXAGENT_SERVER
if (!(pAtoms = xallocarray(numProps, sizeof(Atom))))
#else /* !defined(NXAGENT_SERVER) */
- if (!(pAtoms = xalloc(numProps * sizeof(Atom))))
+ if (!(pAtoms = malloc(numProps * sizeof(Atom))))
#endif /* !defined(NXAGENT_SERVER) */
return BadAlloc;
@@ -437,7 +437,7 @@ ProcRRListProviderProperties(ClientPtr client)
if (numProps) {
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
- xfree(pAtoms);
+ free(pAtoms);
}
return Success;
}
@@ -464,7 +464,7 @@ ProcRRQueryProviderProperty(ClientPtr client)
#ifndef NXAGENT_SERVER
extra = xallocarray(prop->num_valid, sizeof(INT32));
#else /* !defined(NXAGENT_SERVER) */
- extra = xalloc(prop->num_valid * sizeof(INT32));
+ extra = malloc(prop->num_valid * sizeof(INT32));
#endif /* !defined(NXAGENT_SERVER) */
if (!extra)
return BadAlloc;
@@ -487,7 +487,7 @@ ProcRRQueryProviderProperty(ClientPtr client)
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, prop->num_valid * sizeof(INT32),
extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -694,7 +694,7 @@ ProcRRGetProviderProperty(ClientPtr client)
len = min(n - ind, 4 * stuff->longLength);
if (len) {
- extra = xalloc(len);
+ extra = malloc(len);
if (!extra)
return BadAlloc;
}
@@ -741,7 +741,7 @@ ProcRRGetProviderProperty(ClientPtr client)
break;
}
WriteSwappedDataToClient(client, len, extra);
- xfree(extra);
+ free(extra);
}
if (stuff->delete && (reply.bytesAfter == 0)) { /* delete the Property */