Merge remote branch 'alanc/master'

This commit is contained in:
Keith Packard 2010-12-06 19:22:52 -08:00
commit 5de312a60d
13 changed files with 82 additions and 100 deletions

View file

@ -666,13 +666,11 @@ xf86OutputCreate (ScrnInfoPtr scrn,
Bool
xf86OutputRename (xf86OutputPtr output, const char *name)
{
int len = strlen(name) + 1;
char *newname = malloc(len);
char *newname = strdup(name);
if (!newname)
return FALSE; /* so sorry... */
strcpy (newname, name);
if (output->name && output->name != (char *) (output + 1))
free(output->name);
output->name = newname;