Merge remote-tracking branch 'vignatti/for-keith'
This commit is contained in:
commit
c9d89cec14
|
@ -374,10 +374,7 @@ ProcXTestFakeInput(ClientPtr client)
|
||||||
if (!dev->valuator)
|
if (!dev->valuator)
|
||||||
return BadDevice;
|
return BadDevice;
|
||||||
|
|
||||||
/* broken lib, XI events have root uninitialized */
|
if (!(extension || ev->u.keyButtonPointer.root == None))
|
||||||
if (extension || ev->u.keyButtonPointer.root == None)
|
|
||||||
root = GetCurrentRootWindow(dev);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root,
|
rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root,
|
||||||
client, DixGetAttrAccess);
|
client, DixGetAttrAccess);
|
||||||
|
|
|
@ -1607,14 +1607,18 @@ AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx)
|
||||||
if (!others)
|
if (!others)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
if (!pWin->optional->inputMasks && !MakeInputMasks(pWin))
|
if (!pWin->optional->inputMasks && !MakeInputMasks(pWin))
|
||||||
return BadAlloc;
|
goto bail;
|
||||||
others->mask[mskidx] = mask;
|
others->mask[mskidx] = mask;
|
||||||
others->resource = FakeClientID(client->index);
|
others->resource = FakeClientID(client->index);
|
||||||
others->next = pWin->optional->inputMasks->inputClients;
|
others->next = pWin->optional->inputMasks->inputClients;
|
||||||
pWin->optional->inputMasks->inputClients = others;
|
pWin->optional->inputMasks->inputClients = others;
|
||||||
if (!AddResource(others->resource, RT_INPUTCLIENT, (pointer) pWin))
|
if (!AddResource(others->resource, RT_INPUTCLIENT, (pointer) pWin))
|
||||||
return BadAlloc;
|
goto bail;
|
||||||
return Success;
|
return Success;
|
||||||
|
|
||||||
|
bail:
|
||||||
|
free(others);
|
||||||
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
|
|
@ -115,7 +115,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client)
|
||||||
|
|
||||||
if ((others = wOtherInputMasks(pWin)) != 0) {
|
if ((others = wOtherInputMasks(pWin)) != 0) {
|
||||||
for (i = 0; i < EMASKSIZE; i++)
|
for (i = 0; i < EMASKSIZE; i++)
|
||||||
tbuf = ClassFromMask(NULL, others->dontPropagateMask[i], i,
|
ClassFromMask(NULL, others->dontPropagateMask[i], i,
|
||||||
&count, COUNT);
|
&count, COUNT);
|
||||||
if (count) {
|
if (count) {
|
||||||
rep.count = count;
|
rep.count = count;
|
||||||
|
|
|
@ -118,13 +118,13 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
|
||||||
if ((pOthers = wOtherInputMasks(pWin)) != 0) {
|
if ((pOthers = wOtherInputMasks(pWin)) != 0) {
|
||||||
for (others = pOthers->inputClients; others; others = others->next)
|
for (others = pOthers->inputClients; others; others = others->next)
|
||||||
for (i = 0; i < EMASKSIZE; i++)
|
for (i = 0; i < EMASKSIZE; i++)
|
||||||
tclient = ClassFromMask(NULL, others->mask[i], i,
|
ClassFromMask(NULL, others->mask[i], i,
|
||||||
&rep.all_clients_count, COUNT);
|
&rep.all_clients_count, COUNT);
|
||||||
|
|
||||||
for (others = pOthers->inputClients; others; others = others->next)
|
for (others = pOthers->inputClients; others; others = others->next)
|
||||||
if (SameClient(others, client)) {
|
if (SameClient(others, client)) {
|
||||||
for (i = 0; i < EMASKSIZE; i++)
|
for (i = 0; i < EMASKSIZE; i++)
|
||||||
tclient = ClassFromMask(NULL, others->mask[i], i,
|
ClassFromMask(NULL, others->mask[i], i,
|
||||||
&rep.this_client_count, COUNT);
|
&rep.this_client_count, COUNT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -152,8 +152,8 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
|
||||||
if (total_length) {
|
if (total_length) {
|
||||||
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
||||||
WriteSwappedDataToClient(client, total_length, buf);
|
WriteSwappedDataToClient(client, total_length, buf);
|
||||||
free(buf);
|
|
||||||
}
|
}
|
||||||
|
free(buf);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,8 +107,10 @@ ProcXIQueryDevice(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
info = calloc(1, len);
|
info = calloc(1, len);
|
||||||
if (!info)
|
if (!info) {
|
||||||
|
free(skip);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
}
|
||||||
|
|
||||||
memset(&rep, 0, sizeof(xXIQueryDeviceReply));
|
memset(&rep, 0, sizeof(xXIQueryDeviceReply));
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
|
|
|
@ -1879,6 +1879,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
|
||||||
{
|
{
|
||||||
for (p = ppixTemp; p < ppixTemp + npix; p++)
|
for (p = ppixTemp; p < ppixTemp + npix; p++)
|
||||||
pmap->red[*p].refcnt = 0;
|
pmap->red[*p].refcnt = 0;
|
||||||
|
free(ppixTemp);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
pmap->clientPixelsRed[client] = ppix;
|
pmap->clientPixelsRed[client] = ppix;
|
||||||
|
@ -2104,6 +2105,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b,
|
||||||
{
|
{
|
||||||
for (z++ ; z < npixShared; z++)
|
for (z++ ; z < npixShared; z++)
|
||||||
free(ppshared[z]);
|
free(ppshared[z]);
|
||||||
|
free(psharedList);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,16 +66,10 @@ Equipment Corporation.
|
||||||
#include "dixfont.h"
|
#include "dixfont.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef XF86BIGFONT
|
#ifdef XF86BIGFONT
|
||||||
#include "xf86bigfontsrv.h"
|
#include "xf86bigfontsrv.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics
|
|
||||||
|
|
||||||
extern pointer fosNaturalParams;
|
extern pointer fosNaturalParams;
|
||||||
extern FontPtr defaultFont;
|
extern FontPtr defaultFont;
|
||||||
|
|
||||||
|
@ -391,14 +385,6 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
|
||||||
int i;
|
int i;
|
||||||
FontPtr cached = (FontPtr)0;
|
FontPtr cached = (FontPtr)0;
|
||||||
|
|
||||||
#ifdef FONTDEBUG
|
|
||||||
char *f;
|
|
||||||
f = malloc(lenfname + 1);
|
|
||||||
memmove(f, pfontname, lenfname);
|
|
||||||
f[lenfname] = '\0';
|
|
||||||
ErrorF("[dix] OpenFont: fontname is \"%s\"\n", f);
|
|
||||||
free(f);
|
|
||||||
#endif
|
|
||||||
if (!lenfname || lenfname > XLFDMAXFONTNAMELEN)
|
if (!lenfname || lenfname > XLFDMAXFONTNAMELEN)
|
||||||
return BadName;
|
return BadName;
|
||||||
if (patternCache)
|
if (patternCache)
|
||||||
|
@ -1829,8 +1815,10 @@ SetDefaultFontPath(char *path)
|
||||||
/* get enough for string, plus values -- use up commas */
|
/* get enough for string, plus values -- use up commas */
|
||||||
len = strlen(temp_path) + 1;
|
len = strlen(temp_path) + 1;
|
||||||
nump = cp = newpath = malloc(len);
|
nump = cp = newpath = malloc(len);
|
||||||
if (!newpath)
|
if (!newpath) {
|
||||||
|
free(temp_path);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
}
|
||||||
pp = (unsigned char *) temp_path;
|
pp = (unsigned char *) temp_path;
|
||||||
cp++;
|
cp++;
|
||||||
while (*pp) {
|
while (*pp) {
|
||||||
|
|
|
@ -353,9 +353,8 @@ ProcListExtensions(ClientPtr client)
|
||||||
}
|
}
|
||||||
WriteReplyToClient(client, sizeof(xListExtensionsReply), &reply);
|
WriteReplyToClient(client, sizeof(xListExtensionsReply), &reply);
|
||||||
if (reply.length)
|
if (reply.length)
|
||||||
{
|
|
||||||
WriteToClient(client, total_length, buffer);
|
WriteToClient(client, total_length, buffer);
|
||||||
free(buffer);
|
|
||||||
}
|
free(buffer);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -384,12 +384,16 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
||||||
|
|
||||||
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1,
|
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1,
|
||||||
&defaultVisual, ((unsigned long)1<<(bpp1-1)) |
|
&defaultVisual, ((unsigned long)1<<(bpp1-1)) |
|
||||||
((unsigned long)1<<(bpp2-1)), 8))
|
((unsigned long)1<<(bpp2-1)), 8)) {
|
||||||
|
free(pScrPriv);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0,
|
if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0,
|
||||||
depth1, ndepths, depths,
|
depth1, ndepths, depths,
|
||||||
defaultVisual, nvisuals, visuals))
|
defaultVisual, nvisuals, visuals)) {
|
||||||
|
free(pScrPriv);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
/* MI thinks there's no frame buffer */
|
/* MI thinks there's no frame buffer */
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
ShmRegisterFbFuncs(pScreen);
|
ShmRegisterFbFuncs(pScreen);
|
||||||
|
|
|
@ -221,11 +221,7 @@ fbFinishScreenInit(ScreenPtr pScreen,
|
||||||
rootdepth = 0;
|
rootdepth = 0;
|
||||||
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
|
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
|
||||||
&defaultVisual,((unsigned long)1<<(imagebpp-1)), 8))
|
&defaultVisual,((unsigned long)1<<(imagebpp-1)), 8))
|
||||||
{
|
|
||||||
free(visuals);
|
|
||||||
free(depths);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
|
||||||
if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
|
if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
|
||||||
rootdepth, ndepths, depths,
|
rootdepth, ndepths, depths,
|
||||||
defaultVisual, nvisuals, visuals))
|
defaultVisual, nvisuals, visuals))
|
||||||
|
|
|
@ -309,7 +309,7 @@ xf86ModulelistFromConfig(pointer **optlist)
|
||||||
}
|
}
|
||||||
if (found == FALSE) {
|
if (found == FALSE) {
|
||||||
XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
|
XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
|
||||||
ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
|
xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
|
||||||
xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", ModuleDefaults[i].name);
|
xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", ModuleDefaults[i].name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@ xf86ModulelistFromConfig(pointer **optlist)
|
||||||
for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
|
for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
|
||||||
if (ModuleDefaults[i].toLoad == TRUE) {
|
if (ModuleDefaults[i].toLoad == TRUE) {
|
||||||
XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
|
XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
|
||||||
ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
|
xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1459,8 +1459,9 @@ configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp)
|
||||||
while (irp) {
|
while (irp) {
|
||||||
indp[count] = xf86AllocateInput();
|
indp[count] = xf86AllocateInput();
|
||||||
if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) {
|
if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) {
|
||||||
while(count--)
|
do {
|
||||||
free(indp[count]);
|
free(indp[count]);
|
||||||
|
} while(count--);
|
||||||
free(indp);
|
free(indp);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1485,7 +1486,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||||
{
|
{
|
||||||
XF86ConfAdjacencyPtr adjp;
|
XF86ConfAdjacencyPtr adjp;
|
||||||
XF86ConfInactivePtr idp;
|
XF86ConfInactivePtr idp;
|
||||||
int count = 0;
|
int saved_count, count = 0;
|
||||||
int scrnum;
|
int scrnum;
|
||||||
XF86ConfLayoutPtr l;
|
XF86ConfLayoutPtr l;
|
||||||
MessageType from;
|
MessageType from;
|
||||||
|
@ -1553,6 +1554,9 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||||
scrnum = adjp->adj_scrnum;
|
scrnum = adjp->adj_scrnum;
|
||||||
if (!configScreen(slp[count].screen, adjp->adj_screen, scrnum,
|
if (!configScreen(slp[count].screen, adjp->adj_screen, scrnum,
|
||||||
X_CONFIG)) {
|
X_CONFIG)) {
|
||||||
|
do {
|
||||||
|
free(slp[count].screen);
|
||||||
|
} while(count--);
|
||||||
free(slp);
|
free(slp);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1641,6 +1645,10 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!count)
|
||||||
|
saved_count = 1;
|
||||||
|
else
|
||||||
|
saved_count = count;
|
||||||
/*
|
/*
|
||||||
* Count the number of inactive devices.
|
* Count the number of inactive devices.
|
||||||
*/
|
*/
|
||||||
|
@ -1657,16 +1665,14 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||||
idp = conf_layout->lay_inactive_lst;
|
idp = conf_layout->lay_inactive_lst;
|
||||||
count = 0;
|
count = 0;
|
||||||
while (idp) {
|
while (idp) {
|
||||||
if (!configDevice(&gdp[count], idp->inactive_device, FALSE)) {
|
if (!configDevice(&gdp[count], idp->inactive_device, FALSE))
|
||||||
free(gdp);
|
goto bail;
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
count++;
|
count++;
|
||||||
idp = (XF86ConfInactivePtr)idp->list.next;
|
idp = (XF86ConfInactivePtr)idp->list.next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!configInputDevices(conf_layout, servlayoutp))
|
if (!configInputDevices(conf_layout, servlayoutp))
|
||||||
return FALSE;
|
goto bail;
|
||||||
|
|
||||||
servlayoutp->id = conf_layout->lay_identifier;
|
servlayoutp->id = conf_layout->lay_identifier;
|
||||||
servlayoutp->screens = slp;
|
servlayoutp->screens = slp;
|
||||||
|
@ -1675,6 +1681,14 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||||
from = X_DEFAULT;
|
from = X_DEFAULT;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
bail:
|
||||||
|
do {
|
||||||
|
free(slp[saved_count].screen);
|
||||||
|
} while(saved_count--);
|
||||||
|
free(slp);
|
||||||
|
free(gdp);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1831,6 +1831,7 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,
|
||||||
|
|
||||||
xf86SetEntityFuncs(entityIndex,init,enter,leave,private);
|
xf86SetEntityFuncs(entityIndex,init,enter,leave,private);
|
||||||
|
|
||||||
|
free(pEnt);
|
||||||
return pScrn;
|
return pScrn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1414,8 +1414,10 @@ xf86LoadModules(char **list, pointer *optlist)
|
||||||
name = xf86NormalizeName(list[i]);
|
name = xf86NormalizeName(list[i]);
|
||||||
|
|
||||||
/* Skip empty names */
|
/* Skip empty names */
|
||||||
if (name == NULL || *name == '\0')
|
if (name == NULL || *name == '\0') {
|
||||||
|
free(name);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Replace obsolete keyboard driver with kbd */
|
/* Replace obsolete keyboard driver with kbd */
|
||||||
if (!xf86NameCmp(name, "keyboard")) {
|
if (!xf86NameCmp(name, "keyboard")) {
|
||||||
|
|
|
@ -221,11 +221,16 @@ DRI2AddDrawableRef(DRI2DrawablePtr pPriv, XID id, XID dri2_id,
|
||||||
if (ref == NULL)
|
if (ref == NULL)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
if (!AddResource(dri2_id, dri2DrawableRes, pPriv))
|
if (!AddResource(dri2_id, dri2DrawableRes, pPriv)) {
|
||||||
|
free(ref);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
}
|
||||||
if (!DRI2LookupDrawableRef(pPriv, id))
|
if (!DRI2LookupDrawableRef(pPriv, id))
|
||||||
if (!AddResource(id, dri2DrawableRes, pPriv))
|
if (!AddResource(id, dri2DrawableRes, pPriv)) {
|
||||||
|
FreeResourceByType(dri2_id, dri2DrawableRes, TRUE);
|
||||||
|
free(ref);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
}
|
||||||
|
|
||||||
ref->id = id;
|
ref->id = id;
|
||||||
ref->dri2_id = dri2_id;
|
ref->dri2_id = dri2_id;
|
||||||
|
|
|
@ -564,6 +564,8 @@ miInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp,
|
||||||
{
|
{
|
||||||
vid = malloc(nvtype * sizeof (VisualID));
|
vid = malloc(nvtype * sizeof (VisualID));
|
||||||
if (!vid) {
|
if (!vid) {
|
||||||
|
free(depth);
|
||||||
|
free(visual);
|
||||||
free(preferredCVCs);
|
free(preferredCVCs);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -397,7 +397,6 @@ Bool
|
||||||
miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
|
miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
|
||||||
int x, int y, unsigned long source, unsigned long mask)
|
int x, int y, unsigned long source, unsigned long mask)
|
||||||
{
|
{
|
||||||
miDCScreenPtr pScreenPriv;
|
|
||||||
miDCCursorPtr pPriv;
|
miDCCursorPtr pPriv;
|
||||||
miDCBufferPtr pBuffer;
|
miDCBufferPtr pBuffer;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
@ -410,8 +409,7 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
|
||||||
if (!pPriv)
|
if (!pPriv)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
|
||||||
miDCScreenKey);
|
|
||||||
pWin = pScreen->root;
|
pWin = pScreen->root;
|
||||||
pBuffer = miGetDCDevice(pDev, pScreen);
|
pBuffer = miGetDCDevice(pDev, pScreen);
|
||||||
|
|
||||||
|
@ -444,14 +442,11 @@ Bool
|
||||||
miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
int x, int y, int w, int h)
|
int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
miDCScreenPtr pScreenPriv;
|
|
||||||
miDCBufferPtr pBuffer;
|
miDCBufferPtr pBuffer;
|
||||||
PixmapPtr pSave;
|
PixmapPtr pSave;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
|
||||||
miDCScreenKey);
|
|
||||||
pBuffer = miGetDCDevice(pDev, pScreen);
|
pBuffer = miGetDCDevice(pDev, pScreen);
|
||||||
|
|
||||||
pSave = pBuffer->pSave;
|
pSave = pBuffer->pSave;
|
||||||
|
@ -478,14 +473,11 @@ Bool
|
||||||
miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
int x, int y, int w, int h)
|
int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
miDCScreenPtr pScreenPriv;
|
|
||||||
miDCBufferPtr pBuffer;
|
miDCBufferPtr pBuffer;
|
||||||
PixmapPtr pSave;
|
PixmapPtr pSave;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
|
|
||||||
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
|
||||||
miDCScreenKey);
|
|
||||||
pBuffer = miGetDCDevice(pDev, pScreen);
|
pBuffer = miGetDCDevice(pDev, pScreen);
|
||||||
pSave = pBuffer->pSave;
|
pSave = pBuffer->pSave;
|
||||||
|
|
||||||
|
|
|
@ -602,7 +602,6 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, int *x, int *y)
|
||||||
pScreen = newScreen;
|
pScreen = newScreen;
|
||||||
(*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen,
|
(*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen,
|
||||||
FALSE);
|
FALSE);
|
||||||
pScreenPriv = GetScreenPrivate (pScreen);
|
|
||||||
/* Smash the confine to the new screen */
|
/* Smash the confine to the new screen */
|
||||||
pPointer->limits.x2 = pScreen->width;
|
pPointer->limits.x2 = pScreen->width;
|
||||||
pPointer->limits.y2 = pScreen->height;
|
pPointer->limits.y2 = pScreen->height;
|
||||||
|
|
|
@ -458,6 +458,8 @@ void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup)
|
||||||
}
|
}
|
||||||
free(yspans);
|
free(yspans);
|
||||||
free(ysizes);
|
free(ysizes);
|
||||||
|
free(newpoints);
|
||||||
|
free(newwidths);
|
||||||
miDisposeSpanGroup (spanGroup);
|
miDisposeSpanGroup (spanGroup);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,9 +157,11 @@ miZeroLine(
|
||||||
list_len = (height >= width) ? height : width;
|
list_len = (height >= width) ? height : width;
|
||||||
pspanInit = malloc(list_len * sizeof(DDXPointRec));
|
pspanInit = malloc(list_len * sizeof(DDXPointRec));
|
||||||
pwidthInit = malloc(list_len * sizeof(int));
|
pwidthInit = malloc(list_len * sizeof(int));
|
||||||
if (!pspanInit || !pwidthInit)
|
if (!pspanInit || !pwidthInit) {
|
||||||
|
free(pspanInit);
|
||||||
|
free(pwidthInit);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
Nspans = 0;
|
Nspans = 0;
|
||||||
new_span = TRUE;
|
new_span = TRUE;
|
||||||
spans = pspanInit - 1;
|
spans = pspanInit - 1;
|
||||||
|
|
21
os/utils.c
21
os/utils.c
|
@ -1256,10 +1256,7 @@ System(char *command)
|
||||||
perror("signal");
|
perror("signal");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
DebugF("System: `%s'\n", command);
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("System: `%s'\n", command);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (pid = fork()) {
|
switch (pid = fork()) {
|
||||||
case -1: /* error */
|
case -1: /* error */
|
||||||
|
@ -1318,6 +1315,9 @@ Popen(char *command, char *type)
|
||||||
/* Ignore the smart scheduler while this is going on */
|
/* Ignore the smart scheduler while this is going on */
|
||||||
old_alarm = OsSignal(SIGALRM, SIG_IGN);
|
old_alarm = OsSignal(SIGALRM, SIG_IGN);
|
||||||
if (old_alarm == SIG_ERR) {
|
if (old_alarm == SIG_ERR) {
|
||||||
|
close(pdes[0]);
|
||||||
|
close(pdes[1]);
|
||||||
|
free(cur);
|
||||||
perror("signal");
|
perror("signal");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1371,9 +1371,7 @@ Popen(char *command, char *type)
|
||||||
cur->next = pidlist;
|
cur->next = pidlist;
|
||||||
pidlist = cur;
|
pidlist = cur;
|
||||||
|
|
||||||
#ifdef DEBUG
|
DebugF("Popen: `%s', fp = %p\n", command, iop);
|
||||||
ErrorF("Popen: `%s', fp = %p\n", command, iop);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return iop;
|
return iop;
|
||||||
}
|
}
|
||||||
|
@ -1448,9 +1446,7 @@ Fopen(char *file, char *type)
|
||||||
cur->next = pidlist;
|
cur->next = pidlist;
|
||||||
pidlist = cur;
|
pidlist = cur;
|
||||||
|
|
||||||
#ifdef DEBUG
|
DebugF("Fopen(%s), fp = %p\n", file, iop);
|
||||||
ErrorF("Fopen(%s), fp = %p\n", file, iop);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return iop;
|
return iop;
|
||||||
#else
|
#else
|
||||||
|
@ -1479,10 +1475,7 @@ Pclose(pointer iop)
|
||||||
int pstat;
|
int pstat;
|
||||||
int pid;
|
int pid;
|
||||||
|
|
||||||
#ifdef DEBUG
|
DebugF("Pclose: fp = %p\n", iop);
|
||||||
ErrorF("Pclose: fp = %p\n", iop);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
fclose(iop);
|
fclose(iop);
|
||||||
|
|
||||||
for (last = NULL, cur = pidlist; cur; last = cur, cur = cur->next)
|
for (last = NULL, cur = pidlist; cur; last = cur, cur = cur->next)
|
||||||
|
|
|
@ -1372,8 +1372,10 @@ ProcRenderCompositeGlyphs (ClientPtr client)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
listsBase = (GlyphListPtr) malloc(nlist * sizeof (GlyphListRec));
|
listsBase = (GlyphListPtr) malloc(nlist * sizeof (GlyphListRec));
|
||||||
if (!listsBase)
|
if (!listsBase) {
|
||||||
return BadAlloc;
|
rc = BadAlloc;
|
||||||
|
goto bail;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
buffer = (CARD8 *) (stuff + 1);
|
buffer = (CARD8 *) (stuff + 1);
|
||||||
glyphs = glyphsBase;
|
glyphs = glyphsBase;
|
||||||
|
@ -1392,13 +1394,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
|
||||||
GlyphSetType, client,
|
GlyphSetType, client,
|
||||||
DixUseAccess);
|
DixUseAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
{
|
goto bail;
|
||||||
if (glyphsBase != glyphsLocal)
|
|
||||||
free(glyphsBase);
|
|
||||||
if (listsBase != listsLocal)
|
|
||||||
free(listsBase);
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
buffer += 4;
|
buffer += 4;
|
||||||
}
|
}
|
||||||
|
@ -1436,8 +1432,10 @@ ProcRenderCompositeGlyphs (ClientPtr client)
|
||||||
lists++;
|
lists++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (buffer > end)
|
if (buffer > end) {
|
||||||
return BadLength;
|
rc = BadLength;
|
||||||
|
goto bail;
|
||||||
|
}
|
||||||
|
|
||||||
CompositeGlyphs (stuff->op,
|
CompositeGlyphs (stuff->op,
|
||||||
pSrc,
|
pSrc,
|
||||||
|
@ -1448,13 +1446,14 @@ ProcRenderCompositeGlyphs (ClientPtr client)
|
||||||
nlist,
|
nlist,
|
||||||
listsBase,
|
listsBase,
|
||||||
glyphsBase);
|
glyphsBase);
|
||||||
|
rc = Success;
|
||||||
|
|
||||||
|
bail:
|
||||||
if (glyphsBase != glyphsLocal)
|
if (glyphsBase != glyphsLocal)
|
||||||
free(glyphsBase);
|
free(glyphsBase);
|
||||||
if (listsBase != listsLocal)
|
if (listsBase != listsLocal)
|
||||||
free(listsBase);
|
free(listsBase);
|
||||||
|
return rc;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -757,13 +757,11 @@ ProcXFixesSetPictureClipRegion (ClientPtr client)
|
||||||
PicturePtr pPicture;
|
PicturePtr pPicture;
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
PictureScreenPtr ps;
|
|
||||||
REQUEST(xXFixesSetPictureClipRegionReq);
|
REQUEST(xXFixesSetPictureClipRegionReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
|
REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
|
||||||
VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
|
VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
|
||||||
pScreen = pPicture->pDrawable->pScreen;
|
pScreen = pPicture->pDrawable->pScreen;
|
||||||
ps = GetPictureScreen (pScreen);
|
|
||||||
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess);
|
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess);
|
||||||
|
|
||||||
return SetPictureClipRegion (pPicture, stuff->xOrigin, stuff->yOrigin,
|
return SetPictureClipRegion (pPicture, stuff->xOrigin, stuff->yOrigin,
|
||||||
|
|
|
@ -222,8 +222,10 @@ char tmpname[PATH_MAX];
|
||||||
list->nFound[what]= 0;
|
list->nFound[what]= 0;
|
||||||
free(buf);
|
free(buf);
|
||||||
buf = malloc(PATH_MAX * sizeof(char));
|
buf = malloc(PATH_MAX * sizeof(char));
|
||||||
if (!buf)
|
if (!buf) {
|
||||||
|
fclose(in);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
}
|
||||||
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
|
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
|
||||||
unsigned flags;
|
unsigned flags;
|
||||||
register unsigned int i;
|
register unsigned int i;
|
||||||
|
|
Loading…
Reference in New Issue