diff options
Diffstat (limited to 'dix/extension.c')
-rw-r--r-- | dix/extension.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/dix/extension.c b/dix/extension.c index f34866586..6940b68b0 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -89,26 +89,26 @@ AddExtension(char *name, int NumEvents, int NumErrors, return((ExtensionEntry *) NULL); } - ext = xalloc(sizeof(ExtensionEntry)); + ext = malloc(sizeof(ExtensionEntry)); if (!ext) return(NULL); - ext->name = xalloc(strlen(name) + 1); + ext->name = malloc(strlen(name) + 1); ext->num_aliases = 0; ext->aliases = (char **)NULL; ext->devPrivates = 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++; @@ -154,12 +154,12 @@ Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) if (!ext) return FALSE ; - aliases = (char **)xrealloc(ext->aliases, + aliases = (char **)realloc(ext->aliases, (ext->num_aliases + 1) * sizeof(char *)); if (!aliases) return FALSE; ext->aliases = aliases; - name = xalloc(strlen(alias) + 1); + name = malloc(strlen(alias) + 1); if (!name) return FALSE; strcpy(name, alias); @@ -249,14 +249,14 @@ CloseDownExtensions(void) 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); + free(extensions[i]->aliases[j]); + free(extensions[i]->aliases); dixFreePrivates(extensions[i]->devPrivates); - xfree(extensions[i]); + free(extensions[i]); } - xfree(extensions); + free(extensions); extensions = (ExtensionEntry **)NULL; lastEvent = EXTENSION_EVENT_BASE; lastError = FirstExtensionError; @@ -328,7 +328,7 @@ ProcListExtensions(ClientPtr client) total_length += strlen(extensions[i]->aliases[j]) + 1; } reply.length = bytes_to_int32(total_length); - buffer = bufptr = xalloc(total_length); + buffer = bufptr = malloc(total_length); if (!buffer) return(BadAlloc); for (i=0; i<NumExtensions; i++) @@ -352,7 +352,7 @@ ProcListExtensions(ClientPtr client) if (reply.length) { WriteToClient(client, total_length, buffer); - xfree(buffer); + free(buffer); } return(client->noClientException); } |