diff options
author | Adam Jackson <ajax@redhat.com> | 2015-09-21 15:23:23 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2015-10-26 12:19:15 -0400 |
commit | 8810c46a98a107cf53b30696cfad6e388b73024d (patch) | |
tree | ac299ca5123c3d6a1ad6858add3187c581750010 | |
parent | 9a4ea1f5ea7f813d28cf322aca6f2ea8c427bd1a (diff) |
rootless: Fix bogus handling of broken root clip
gcc quite correctly complains about this:
In file included from ../../include/scrnintstr.h:51:0,
from rootlessValTree.c:98:
In function 'RegionUninit.isra.1',
inlined from 'RegionEmpty' at ../../include/regionstr.h:194:5,
inlined from 'RootlessMiValidateTree' at rootlessValTree.c:490:9:
../../include/regionstr.h:166:9: warning: attempt to free a non-heap object 'RegionBrokenData' [-Wfree-nonheap-object]
free((_pReg)->data);
So that'd crash if you ever got there. RegionNull will do almost the
same thing only without the free(), so let's do that instead; it might
still not be an entirely sane way to recover, but it at least won't
crash.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit fa0bb01899d586e02cf51892c17edd22e462a46c)
-rw-r--r-- | miext/rootless/rootlessValTree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c index 0f7b76cb6..409e6a092 100644 --- a/miext/rootless/rootlessValTree.c +++ b/miext/rootless/rootlessValTree.c @@ -487,7 +487,7 @@ RootlessMiValidateTree(WindowPtr pRoot, /* Parent to validate */ if (RegionBroken(&pRoot->clipList) && !RegionBroken(&pRoot->borderClip)) { // fixme this might not work, but hopefully doesn't happen anyway. kind = VTBroken; - RegionEmpty(&pRoot->clipList); + RegionNull(&pRoot->clipList); ErrorF("ValidateTree: BUSTED!\n"); } |