From 94e7ca6a5667eeb13c078496a07d3e6cf1ec95cc Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 31 Jan 2018 17:33:48 +0100 Subject: [PATCH] rrmonitor: allocate using the correct type Monitor outputs are of type RROutput, not RRCrtc. (Which are both XID, so this makes no difference in practice, other than being technically correct.) Signed-off-by: Giuseppe Bilotta Reviewed-by: Adam Jackson --- randr/rrmonitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/randr/rrmonitor.c b/randr/rrmonitor.c index 3f6e03e7d..1bb5018fe 100644 --- a/randr/rrmonitor.c +++ b/randr/rrmonitor.c @@ -92,7 +92,7 @@ RRMonitorSetFromServer(RRCrtcPtr crtc, RRMonitorPtr monitor) monitor->name = RRMonitorCrtcName(crtc); monitor->pScreen = crtc->pScreen; monitor->numOutputs = crtc->numOutputs; - monitor->outputs = calloc(crtc->numOutputs, sizeof(RRCrtc)); + monitor->outputs = calloc(crtc->numOutputs, sizeof(RROutput)); if (!monitor->outputs) return FALSE; for (o = 0; o < crtc->numOutputs; o++)