diff options
Diffstat (limited to 'libX11/src/InitExt.c')
-rw-r--r-- | libX11/src/InitExt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libX11/src/InitExt.c b/libX11/src/InitExt.c index cb9191de6..19515ccd0 100644 --- a/libX11/src/InitExt.c +++ b/libX11/src/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; |