aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/InitExt.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11/InitExt.c')
-rw-r--r--nx-X11/lib/X11/InitExt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nx-X11/lib/X11/InitExt.c b/nx-X11/lib/X11/InitExt.c
index 21c392c0e..fdadd9ef7 100644
--- a/nx-X11/lib/X11/InitExt.c
+++ b/nx-X11/lib/X11/InitExt.c
@@ -50,14 +50,13 @@ XExtCodes *XInitExtension (
LockDisplay (dpy);
if (! (ext = (_XExtension *) Xcalloc (1, sizeof (_XExtension))) ||
- ! (ext->name = Xmalloc((unsigned) strlen(name) + 1))) {
+ ! (ext->name = strdup(name))) {
if (ext) Xfree((char *) ext);
UnlockDisplay(dpy);
return (XExtCodes *) NULL;
}
codes.extension = dpy->ext_number++;
ext->codes = codes;
- (void) strcpy(ext->name, name);
/* chain it onto the display list */
ext->next = dpy->ext_procs;