diff options
author | marha <marha@users.sourceforge.net> | 2009-11-16 13:46:01 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-11-16 13:46:01 +0000 |
commit | 578938f1cdd5a06dd6fa28167d575ec980322a5d (patch) | |
tree | e31cf77fab7cc6e005b0e726e7951d7eef79550f /xorg-server/Xext | |
parent | 0032f9b66d63a4b1c5222edb8603fb60da379fb0 (diff) | |
download | vcxsrv-578938f1cdd5a06dd6fa28167d575ec980322a5d.tar.gz vcxsrv-578938f1cdd5a06dd6fa28167d575ec980322a5d.tar.bz2 vcxsrv-578938f1cdd5a06dd6fa28167d575ec980322a5d.zip |
Update to git master branch of xserver.
Diffstat (limited to 'xorg-server/Xext')
-rw-r--r-- | xorg-server/Xext/shm.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/xorg-server/Xext/shm.c b/xorg-server/Xext/shm.c index 8106c40b6..9e462f216 100644 --- a/xorg-server/Xext/shm.c +++ b/xorg-server/Xext/shm.c @@ -141,7 +141,6 @@ int BadShmSegCode; RESTYPE ShmSegType; static ShmDescPtr Shmsegs; static Bool sharedPixmaps; -static DrawablePtr *drawables; static int shmScrPrivateKeyIndex; static DevPrivateKey shmScrPrivateKey = &shmScrPrivateKeyIndex; static int shmPixmapPrivateIndex; @@ -259,13 +258,6 @@ ShmExtensionInit(INITARGS) } #endif - drawables = xcalloc(screenInfo.numScreens, sizeof(DrawablePtr)); - if (!drawables) - { - ErrorF("MIT-SHM extension disabled: no memory for per-screen drawables\n"); - return; - } - sharedPixmaps = xFalse; { sharedPixmaps = xTrue; @@ -618,6 +610,7 @@ static int ProcPanoramiXShmGetImage(ClientPtr client) { PanoramiXRes *draw; + DrawablePtr *drawables; DrawablePtr pDraw; xShmGetImageReply xgi; ShmDescPtr shmdesc; @@ -678,12 +671,19 @@ ProcPanoramiXShmGetImage(ClientPtr client) return(BadMatch); } + drawables = xcalloc(PanoramiXNumScreens, sizeof(DrawablePtr)); + if(!drawables) + return(BadAlloc); + drawables[0] = pDraw; for(i = 1; i < PanoramiXNumScreens; i++) { rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0, DixReadAccess); if (rc != Success) + { + xfree(drawables); return rc; + } } xgi.visual = wVisual(((WindowPtr)pDraw)); @@ -722,6 +722,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) } } } + xfree(drawables); if (client->swapped) { int n; |