diff options
Diffstat (limited to 'nx-X11/programs/Xserver/dix/extension.c')
-rw-r--r-- | nx-X11/programs/Xserver/dix/extension.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/nx-X11/programs/Xserver/dix/extension.c b/nx-X11/programs/Xserver/dix/extension.c index fe51f8916..b0859757b 100644 --- a/nx-X11/programs/Xserver/dix/extension.c +++ b/nx-X11/programs/Xserver/dix/extension.c @@ -95,25 +95,25 @@ AddExtension(char *name, int NumEvents, int NumErrors, (unsigned)(lastError + NumErrors > LAST_ERROR)) return((ExtensionEntry *) NULL); - ext = (ExtensionEntry *) xalloc(sizeof(ExtensionEntry)); + ext = (ExtensionEntry *) malloc(sizeof(ExtensionEntry)); if (!ext) return((ExtensionEntry *) NULL); - ext->name = (char *)xalloc(strlen(name) + 1); + ext->name = (char *)malloc(strlen(name) + 1); ext->num_aliases = 0; ext->aliases = (char **)NULL; if (!ext->name) { - xfree(ext); + free(ext); return((ExtensionEntry *) NULL); } strcpy(ext->name, name); i = NumExtensions; - newexts = (ExtensionEntry **) xrealloc(extensions, + newexts = (ExtensionEntry **) realloc(extensions, (i + 1) * sizeof(ExtensionEntry *)); if (!newexts) { - xfree(ext->name); - xfree(ext); + free(ext->name); + free(ext); return((ExtensionEntry *) NULL); } NumExtensions++; @@ -159,12 +159,12 @@ Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) char *name; char **aliases; - aliases = (char **)xrealloc(ext->aliases, + aliases = (char **)realloc(ext->aliases, (ext->num_aliases + 1) * sizeof(char *)); if (!aliases) return FALSE; ext->aliases = aliases; - name = (char *)xalloc(strlen(alias) + 1); + name = (char *)malloc(strlen(alias) + 1); if (!name) return FALSE; strcpy(name, alias); @@ -263,13 +263,13 @@ CloseDownExtensions() if (extensions[i]->CloseDown) (* extensions[i]->CloseDown)(extensions[i]); NumExtensions = i; - xfree(extensions[i]->name); + free(extensions[i]->name); for (j = extensions[i]->num_aliases; --j >= 0;) - xfree(extensions[i]->aliases[j]); - xfree(extensions[i]->aliases); - xfree(extensions[i]); + free(extensions[i]->aliases[j]); + free(extensions[i]->aliases); + free(extensions[i]); } - xfree(extensions); + free(extensions); extensions = (ExtensionEntry **)NULL; lastEvent = EXTENSION_EVENT_BASE; lastError = FirstExtensionError; @@ -280,9 +280,9 @@ CloseDownExtensions() while (spentry->num) { spentry->num--; - xfree(spentry->procList[spentry->num].name); + free(spentry->procList[spentry->num].name); } - xfree(spentry->procList); + free(spentry->procList); spentry->procList = (ProcEntryPtr)NULL; } } @@ -438,15 +438,15 @@ RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc) procEntry->proc = proc; else { - newname = (char *)xalloc(strlen(name)+1); + newname = (char *)malloc(strlen(name)+1); if (!newname) return FALSE; procEntry = (ProcEntryPtr) - xrealloc(spentry->procList, + realloc(spentry->procList, sizeof(ProcEntryRec) * (spentry->num+1)); if (!procEntry) { - xfree(newname); + free(newname); return FALSE; } spentry->procList = procEntry; |