summaryrefslogtreecommitdiff
path: root/exa/exa_offscreen.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-08-24 23:38:25 +0000
committerEric Anholt <anholt@freebsd.org>2005-08-24 23:38:25 +0000
commit2261710fe0dffd60433e3362ac12adf4db570fe5 (patch)
treec9db983652bff347abc075a0c36cd6ff2e2df09f /exa/exa_offscreen.c
parent55c5c6953a3a661758a42b147f9542950a62fc4d (diff)
Fix a bug where NULL could be dereferenced during the pixmap kick-out
process by referencing the correct offscreen area. Also drive-by the comments related to these for clarity.
Diffstat (limited to 'exa/exa_offscreen.c')
-rw-r--r--exa/exa_offscreen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index dbca172c4..e55e0ac43 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -127,7 +127,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
if (begin->state == ExaOffscreenLocked)
continue;
- /* adjust size to match alignment requirement */
+ /* adjust size needed to account for alignment loss for this area */
real_size = size;
tmp = begin->offset % align;
if (tmp)
@@ -164,9 +164,9 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
return NULL;
}
- /* adjust size to match alignment requirement */
+ /* adjust size needed to account for alignment loss for this area */
real_size = size;
- tmp = begin->offset % align;
+ tmp = area->offset % align;
if (tmp)
real_size += (align - tmp);