diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 14:11:38 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 14:11:38 +0200 |
commit | 1dbd3c888a3eee51db5303bd93e95b84999f5d31 (patch) | |
tree | 84db92271726b42b8c0864c8b7c77b2330566fc1 /nx-X11/programs/Xserver/Xext/shm.c | |
parent | 279d37127db241a9ee685f6b671f51aa21a972ea (diff) | |
parent | e85808245810d0cc6918104deef25213d5f9e06c (diff) | |
download | nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.gz nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.bz2 nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.zip |
Merge branch 'sunweaver-pr/backport-Xorg-memory-handling' into 3.6.x
Attributes GH PR #159: https://github.com/ArcticaProject/nx-libs/pull/159
Reviewed by: Vadim Troshchinskiy <vadim@qindel.com> -- Fri, 01 Jul 2016 12:47:46 -0700
Diffstat (limited to 'nx-X11/programs/Xserver/Xext/shm.c')
-rw-r--r-- | nx-X11/programs/Xserver/Xext/shm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index 83d6eaaab..af529e46f 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -439,7 +439,7 @@ ProcShmAttach(client) } else { - shmdesc = (ShmDescPtr) xalloc(sizeof(ShmDescRec)); + shmdesc = (ShmDescPtr) malloc(sizeof(ShmDescRec)); if (!shmdesc) return BadAlloc; shmdesc->addr = shmat(stuff->shmid, 0, @@ -447,7 +447,7 @@ ProcShmAttach(client) if ((shmdesc->addr == ((char *)-1)) || shmctl(stuff->shmid, IPC_STAT, &buf)) { - xfree(shmdesc); + free(shmdesc); return BadAccess; } @@ -457,7 +457,7 @@ ProcShmAttach(client) if (shm_access(client, &(buf.shm_perm), stuff->readOnly) == -1) { shmdt(shmdesc->addr); - xfree(shmdesc); + free(shmdesc); return BadAccess; } @@ -488,7 +488,7 @@ ShmDetachSegment(value, shmseg) for (prev = &Shmsegs; *prev != shmdesc; prev = &(*prev)->next) ; *prev = shmdesc->next; - xfree(shmdesc); + free(shmdesc); return Success; } @@ -779,7 +779,7 @@ CreatePmap: VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); - if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPix = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; @@ -820,7 +820,7 @@ CreatePmap: (*pScreen->DestroyPixmap)(pMap); FreeResource(newPix->info[j].id, RT_NONE); } - xfree(newPix); + free(newPix); } else AddResource(stuff->pid, XRT_PIXMAP, newPix); |