Signed-off-by: Giuseppe Bilotta <[email protected]>
---
randr/rrcrtc.c | 6 ++++++
randr/rroutput.c | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 2eb9fbdc8..90922484f 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -873,6 +873,11 @@ RRCrtcDestroyResource(void *value, XID pid)
}
}
+ if (pScrPriv->numCrtcs == 0) {
+ free(pScrPriv->crtcs);
+ pScrPriv->crtcs = NULL;
+ }
+
RRResourcesChanged(pScreen);
}
@@ -881,6 +886,7 @@ RRCrtcDestroyResource(void *value, XID pid)
free(crtc->gammaRed);
if (crtc->mode)
RRModeDestroy(crtc->mode);
+ free(crtc->outputs);
free(crtc);
return 1;
}
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 647f19a52..12afe7e6c 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -371,6 +371,11 @@ RROutputDestroyResource(void *value, XID pid)
}
}
+ if (pScrPriv->numOutputs == 0) {
+ free(pScrPriv->outputs);
+ pScrPriv->outputs = NULL;
+ }
+
RRResourcesChanged(pScreen);
}
if (output->modes) {
--
2.14.1.439.g647b9b4702
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel