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.
This commit is contained in:
Eric Anholt 2005-08-24 23:38:25 +00:00
parent 55c5c6953a
commit 2261710fe0
3 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);