aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/glx/indirect.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/glx/indirect.c')
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index d2ed16e7c..8b265c70b 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -444,7 +444,7 @@ glxLogExtensions(const char *prefix, const char *extensions)
{
int length = 0;
char *strl;
- char *str = malloc(strlen(extensions) + 1);
+ char *str = strdup(extensions);
if (str == NULL)
{
@@ -452,9 +452,6 @@ glxLogExtensions(const char *prefix, const char *extensions)
return;
}
- str[strlen(extensions)] = '\0';
- strncpy (str, extensions, strlen(extensions));
-
strl = strtok(str, " ");
ErrorF("%s%s", prefix, strl);
length = strlen(prefix) + strlen(strl);