summaryrefslogtreecommitdiff
path: root/driver/xf86-video-chips/src/ct_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/xf86-video-chips/src/ct_video.c')
-rw-r--r--driver/xf86-video-chips/src/ct_video.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/driver/xf86-video-chips/src/ct_video.c b/driver/xf86-video-chips/src/ct_video.c
index 130634b66..a68acb92d 100644
--- a/driver/xf86-video-chips/src/ct_video.c
+++ b/driver/xf86-video-chips/src/ct_video.c
@@ -70,7 +70,7 @@ CHIPSInitVideo(ScreenPtr pScreen)
adaptors = &newAdaptor;
} else {
newAdaptors = /* need to free this someplace */
- xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
+ malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
if(newAdaptors) {
memcpy(newAdaptors, adaptors, num_adaptors *
sizeof(XF86VideoAdaptorPtr));
@@ -84,8 +84,7 @@ CHIPSInitVideo(ScreenPtr pScreen)
if(num_adaptors)
xf86XVScreenInit(pScreen, adaptors, num_adaptors);
- if(newAdaptors)
- xfree(newAdaptors);
+ free(newAdaptors);
}
/* client libraries expect an encoding */
@@ -236,9 +235,9 @@ CHIPSSetupImageVideo(ScreenPtr pScreen)
XF86VideoAdaptorPtr adapt;
CHIPSPortPrivPtr pPriv;
- if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
- sizeof(CHIPSPortPrivRec) +
- sizeof(DevUnion))))
+ if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
+ sizeof(CHIPSPortPrivRec) +
+ sizeof(DevUnion))))
return NULL;
adapt->type = XvWindowMask | XvInputMask | XvImageMask;
@@ -880,18 +879,18 @@ CHIPSAllocateSurface(
surface->width = w;
surface->height = h;
- if(!(surface->pitches = xalloc(sizeof(int)))) {
+ if(!(surface->pitches = malloc(sizeof(int)))) {
xf86FreeOffscreenLinear(linear);
return BadAlloc;
}
- if(!(surface->offsets = xalloc(sizeof(int)))) {
- xfree(surface->pitches);
+ if(!(surface->offsets = malloc(sizeof(int)))) {
+ free(surface->pitches);
xf86FreeOffscreenLinear(linear);
return BadAlloc;
}
- if(!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) {
- xfree(surface->pitches);
- xfree(surface->offsets);
+ if(!(pPriv = malloc(sizeof(OffscreenPrivRec)))) {
+ free(surface->pitches);
+ free(surface->offsets);
xf86FreeOffscreenLinear(linear);
return BadAlloc;
}
@@ -937,9 +936,9 @@ CHIPSFreeSurface(
if(pPriv->isOn)
CHIPSStopSurface(surface);
xf86FreeOffscreenLinear(pPriv->linear);
- xfree(surface->pitches);
- xfree(surface->offsets);
- xfree(surface->devPrivate.ptr);
+ free(surface->pitches);
+ free(surface->offsets);
+ free(surface->devPrivate.ptr);
return Success;
}
@@ -1029,7 +1028,7 @@ CHIPSInitOffscreenImages(ScreenPtr pScreen)
XF86OffscreenImagePtr offscreenImages;
/* need to free this someplace */
- if(!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec))))
+ if(!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec))))
return;
offscreenImages[0].image = &Images[0];