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:
parent
55c5c6953a
commit
2261710fe0
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user