aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/1252_nx-X11_Free-randr-crtc-and-output-pointer-array.full.patch
blob: 14b08600fa2aead4a9cfd4d22dcb3d70a794d9c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
commit 2aeb7671963932d5ddb771ad641969e20bb9aa25
Author: Keith Packard <keithp@keithp.com>
Date:   Thu Sep 17 18:14:37 2009 -0700

    Backport: Free randr crtc and output pointer arrays

    All of the crts and outputs were freed, but not the arrays full of
    pointers to them.

    Signed-off-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

    Backported from Arctica GH 3.6.x branch.

    v2: backport to nx-libs 3.6.x (Ulrich Sibiller)
    v3: backport to nx-libs 3.5.0.x (Mihai Moldovan)

--- a/nx-X11/programs/Xserver/randr/randr.c
+++ b/nx-X11/programs/Xserver/randr/randr.c
@@ -125,6 +125,8 @@ RRCloseScreen (int i, ScreenPtr pScreen)
     for (j = pScrPriv->numOutputs - 1; j >= 0; j--)
 	RROutputDestroy (pScrPriv->outputs[j]);
     
+    xfree (pScrPriv->crtcs);
+    xfree (pScrPriv->outputs);
     xfree (pScrPriv);
     RRNScreens -= 1;	/* ok, one fewer screen with RandR running */
     return (*pScreen->CloseScreen) (i, pScreen);