diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-12-07 07:23:20 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-07 07:23:20 +0100 |
commit | 5487d52fe1c37244c649c3aefb78600f08ffb91b (patch) | |
tree | 2d30b58a9044c67c5f844fa9bc424ef7faa4052a /nx-X11/programs/Xserver/randr/rrcrtc.c | |
parent | c571aa9eda7d69b3de1647a208c685a971c9ad38 (diff) | |
parent | aac4c5f590de3a6dacb01579848b25f6bdd3cc56 (diff) | |
download | nx-libs-5487d52fe1c37244c649c3aefb78600f08ffb91b.tar.gz nx-libs-5487d52fe1c37244c649c3aefb78600f08ffb91b.tar.bz2 nx-libs-5487d52fe1c37244c649c3aefb78600f08ffb91b.zip |
Merge branch 'uli42-pr/various_backports' into 3.6.x
Attributes GH PR #581: https://github.com/ArcticaProject/nx-libs/pull/581
Fixes: ArcticaProject/nx-libs#558
Fixes: ArcticaProject/nx-libs#541
Fixes: ArcticaProject/nx-libs#542
Diffstat (limited to 'nx-X11/programs/Xserver/randr/rrcrtc.c')
-rw-r--r-- | nx-X11/programs/Xserver/randr/rrcrtc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrcrtc.c b/nx-X11/programs/Xserver/randr/rrcrtc.c index 7775747f8..20ab73c5b 100644 --- a/nx-X11/programs/Xserver/randr/rrcrtc.c +++ b/nx-X11/programs/Xserver/randr/rrcrtc.c @@ -89,13 +89,10 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate) pScrPriv = rrGetScrPriv(pScreen); /* make space for the crtc pointer */ - if (pScrPriv->numCrtcs) - crtcs = reallocarray(pScrPriv->crtcs, - pScrPriv->numCrtcs + 1, sizeof(RRCrtcPtr)); - else - crtcs = malloc(sizeof(RRCrtcPtr)); + crtcs = reallocarray(pScrPriv->crtcs, + pScrPriv->numCrtcs + 1, sizeof(RRCrtcPtr)); if (!crtcs) - return FALSE; + return NULL; pScrPriv->crtcs = crtcs; crtc = calloc(1, sizeof(RRCrtcRec)); @@ -772,6 +769,7 @@ RRCrtcDestroyResource(void *value, XID pid) free(crtc->gammaRed); if (crtc->mode) RRModeDestroy(crtc->mode); + free(crtc->outputs); free(crtc); return 1; } |