diff options
author | Gerald Carter <jerry@samba.org> | 2004-12-16 12:30:49 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-12-16 12:30:49 +0000 |
commit | 8d91e07ef22ad3ed484b04bc4968380a24940696 (patch) | |
tree | b5b8989f8da9ef7f852081f0460995386edd4b5d /source/rpcclient/rpcclient.c | |
parent | 1a878c865637feb80206c0dc599acebf7f4a46bd (diff) | |
download | samba-8d91e07ef22ad3ed484b04bc4968380a24940696.tar.gz samba-8d91e07ef22ad3ed484b04bc4968380a24940696.tar.xz samba-8d91e07ef22ad3ed484b04bc4968380a24940696.zip |
r4231: commiting changes to 3.0.10samba-3.0.10
Diffstat (limited to 'source/rpcclient/rpcclient.c')
-rw-r--r-- | source/rpcclient/rpcclient.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index bac11f7435f..e003b86e67b 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -59,10 +59,10 @@ static char **completion_fn(const char *text, int start, int end) if (!commands) return NULL; - matches = (char **)malloc(sizeof(matches[0])*MAX_COMPLETIONS); + matches = SMB_MALLOC_ARRAY(char *, MAX_COMPLETIONS); if (!matches) return NULL; - matches[count++] = strdup(text); + matches[count++] = SMB_STRDUP(text); if (!matches[0]) return NULL; while (commands && count < MAX_COMPLETIONS-1) @@ -78,7 +78,7 @@ static char **completion_fn(const char *text, int start, int end) ( commands->cmd_set[i].returntype == RPC_RTYPE_WERROR && commands->cmd_set[i].wfn))) { - matches[count] = strdup(commands->cmd_set[i].name); + matches[count] = SMB_STRDUP(commands->cmd_set[i].name); if (!matches[count]) return NULL; count++; @@ -91,7 +91,7 @@ static char **completion_fn(const char *text, int start, int end) if (count == 2) { SAFE_FREE(matches[0]); - matches[0] = strdup(matches[1]); + matches[0] = SMB_STRDUP(matches[1]); } matches[count] = NULL; return matches; @@ -485,7 +485,7 @@ static void add_command_set(struct cmd_set *cmd_set) { struct cmd_list *entry; - if (!(entry = (struct cmd_list *)malloc(sizeof(struct cmd_list)))) { + if (!(entry = SMB_MALLOC_P(struct cmd_list))) { DEBUG(0, ("out of memory\n")); return; } |