mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-30 21:53:25 +00:00
exa: delay malloc for "mixed"
This commit is contained in:
parent
e8ac2ed5dc
commit
3047bd0674
3 changed files with 17 additions and 10 deletions
|
|
@ -81,17 +81,10 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
|
|||
|
||||
datasize = h * paddedWidth;
|
||||
|
||||
/* Allocate temporary pixmap. */
|
||||
pExaPixmap->sys_ptr = malloc(datasize);
|
||||
/* We will allocate the system pixmap later if needed. */
|
||||
pExaPixmap->sys_ptr = NULL;
|
||||
pExaPixmap->sys_pitch = paddedWidth;
|
||||
|
||||
if (!pExaPixmap->sys_ptr) {
|
||||
swap(pExaScr, pScreen, DestroyPixmap);
|
||||
pScreen->DestroyPixmap (pPixmap);
|
||||
swap(pExaScr, pScreen, DestroyPixmap);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pExaPixmap->area = NULL;
|
||||
pExaPixmap->offscreen = FALSE;
|
||||
pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue