Merge remote-tracking branch 'vignatti/for-keith'
This commit is contained in:
@@ -309,7 +309,7 @@ xf86ModulelistFromConfig(pointer **optlist)
|
||||
}
|
||||
if (found == FALSE) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -318,7 +318,7 @@ xf86ModulelistFromConfig(pointer **optlist)
|
||||
for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
|
||||
if (ModuleDefaults[i].toLoad == TRUE) {
|
||||
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) {
|
||||
indp[count] = xf86AllocateInput();
|
||||
if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) {
|
||||
while(count--)
|
||||
do {
|
||||
free(indp[count]);
|
||||
} while(count--);
|
||||
free(indp);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1485,7 +1486,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||
{
|
||||
XF86ConfAdjacencyPtr adjp;
|
||||
XF86ConfInactivePtr idp;
|
||||
int count = 0;
|
||||
int saved_count, count = 0;
|
||||
int scrnum;
|
||||
XF86ConfLayoutPtr l;
|
||||
MessageType from;
|
||||
@@ -1553,6 +1554,9 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||
scrnum = adjp->adj_scrnum;
|
||||
if (!configScreen(slp[count].screen, adjp->adj_screen, scrnum,
|
||||
X_CONFIG)) {
|
||||
do {
|
||||
free(slp[count].screen);
|
||||
} while(count--);
|
||||
free(slp);
|
||||
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.
|
||||
*/
|
||||
@@ -1657,16 +1665,14 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||
idp = conf_layout->lay_inactive_lst;
|
||||
count = 0;
|
||||
while (idp) {
|
||||
if (!configDevice(&gdp[count], idp->inactive_device, FALSE)) {
|
||||
free(gdp);
|
||||
return FALSE;
|
||||
}
|
||||
if (!configDevice(&gdp[count], idp->inactive_device, FALSE))
|
||||
goto bail;
|
||||
count++;
|
||||
idp = (XF86ConfInactivePtr)idp->list.next;
|
||||
}
|
||||
|
||||
if (!configInputDevices(conf_layout, servlayoutp))
|
||||
return FALSE;
|
||||
goto bail;
|
||||
|
||||
servlayoutp->id = conf_layout->lay_identifier;
|
||||
servlayoutp->screens = slp;
|
||||
@@ -1675,6 +1681,14 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||
from = X_DEFAULT;
|
||||
|
||||
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);
|
||||
|
||||
free(pEnt);
|
||||
return pScrn;
|
||||
}
|
||||
|
||||
|
||||
@@ -1414,8 +1414,10 @@ xf86LoadModules(char **list, pointer *optlist)
|
||||
name = xf86NormalizeName(list[i]);
|
||||
|
||||
/* Skip empty names */
|
||||
if (name == NULL || *name == '\0')
|
||||
if (name == NULL || *name == '\0') {
|
||||
free(name);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Replace obsolete keyboard driver with kbd */
|
||||
if (!xf86NameCmp(name, "keyboard")) {
|
||||
|
||||
@@ -221,11 +221,16 @@ DRI2AddDrawableRef(DRI2DrawablePtr pPriv, XID id, XID dri2_id,
|
||||
if (ref == NULL)
|
||||
return BadAlloc;
|
||||
|
||||
if (!AddResource(dri2_id, dri2DrawableRes, pPriv))
|
||||
if (!AddResource(dri2_id, dri2DrawableRes, pPriv)) {
|
||||
free(ref);
|
||||
return BadAlloc;
|
||||
}
|
||||
if (!DRI2LookupDrawableRef(pPriv, id))
|
||||
if (!AddResource(id, dri2DrawableRes, pPriv))
|
||||
if (!AddResource(id, dri2DrawableRes, pPriv)) {
|
||||
FreeResourceByType(dri2_id, dri2DrawableRes, TRUE);
|
||||
free(ref);
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
ref->id = id;
|
||||
ref->dri2_id = dri2_id;
|
||||
|
||||
Reference in New Issue
Block a user