aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/extension.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-11 09:26:35 +0000
committermarha <marha@users.sourceforge.net>2010-09-11 09:26:35 +0000
commit35b29c19707341bbfa32f7f6136ce09e59cb332c (patch)
treea795242657a2b96a463a11774517472fa4c64953 /xorg-server/dix/extension.c
parentba6498fea6d935aff0856f9851cb47d5657952fa (diff)
parente172c89783326e2378e4793ff31a0f44210c5534 (diff)
downloadvcxsrv-35b29c19707341bbfa32f7f6136ce09e59cb332c.tar.gz
vcxsrv-35b29c19707341bbfa32f7f6136ce09e59cb332c.tar.bz2
vcxsrv-35b29c19707341bbfa32f7f6136ce09e59cb332c.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/dix/extension.c')
-rw-r--r--xorg-server/dix/extension.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xorg-server/dix/extension.c b/xorg-server/dix/extension.c
index f6b33d64c..b7f5c9c8c 100644
--- a/xorg-server/dix/extension.c
+++ b/xorg-server/dix/extension.c
@@ -96,7 +96,7 @@ AddExtension(char *name, int NumEvents, int NumErrors,
free(ext);
return NULL;
}
- ext->name = malloc(strlen(name) + 1);
+ ext->name = strdup(name);
ext->num_aliases = 0;
ext->aliases = (char **)NULL;
if (!ext->name)
@@ -105,7 +105,6 @@ AddExtension(char *name, int NumEvents, int NumErrors,
free(ext);
return((ExtensionEntry *) NULL);
}
- strcpy(ext->name, name);
i = NumExtensions;
newexts = (ExtensionEntry **) realloc(extensions,
(i + 1) * sizeof(ExtensionEntry *));
@@ -164,10 +163,9 @@ Bool AddExtensionAlias(char *alias, ExtensionEntry *ext)
if (!aliases)
return FALSE;
ext->aliases = aliases;
- name = malloc(strlen(alias) + 1);
+ name = strdup(alias);
if (!name)
return FALSE;
- strcpy(name, alias);
ext->aliases[ext->num_aliases] = name;
ext->num_aliases++;
return TRUE;