Revert "randr: RROutputCreate(): use calloc()"

This reverts commit 3d3137513a.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2012>
This commit is contained in:
Alan Coopersmith 2025-06-11 13:42:13 -07:00
parent 9f2b9adbe3
commit 896d9d3be8

View File

@ -83,7 +83,7 @@ RROutputCreate(ScreenPtr pScreen,
pScrPriv->outputs = outputs;
output = calloc(1, sizeof(RROutputRec) + nameLength + 1);
output = malloc(sizeof(RROutputRec) + nameLength + 1);
if (!output)
return NULL;
output->id = FakeClientID(0);
@ -94,6 +94,22 @@ RROutputCreate(ScreenPtr pScreen,
output->name[nameLength] = '\0';
output->connection = RR_UnknownConnection;
output->subpixelOrder = SubPixelUnknown;
output->mmWidth = 0;
output->mmHeight = 0;
output->crtc = NULL;
output->numCrtcs = 0;
output->crtcs = NULL;
output->numClones = 0;
output->clones = NULL;
output->numModes = 0;
output->numPreferred = 0;
output->modes = NULL;
output->numUserModes = 0;
output->userModes = NULL;
output->properties = NULL;
output->pendingProperties = FALSE;
output->changed = FALSE;
output->nonDesktop = FALSE;
output->devPrivate = devPrivate;
if (!AddResource(output->id, RROutputType, (void *) output))