summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools/regshell.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry/tools/regshell.c')
-rw-r--r--source4/lib/registry/tools/regshell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index 3333299088..f18b012720 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -247,7 +247,7 @@ static char **reg_complete_command(const char *text, int end)
char **matches;
int i, len, samelen=0, count=1;
- matches = (char **)malloc(sizeof(matches[0])*MAX_COMPLETIONS);
+ matches = malloc_array_p(char *, MAX_COMPLETIONS);
if (!matches) return NULL;
matches[0] = NULL;
@@ -301,7 +301,7 @@ static char **reg_complete_key(const char *text, int end)
TALLOC_CTX *mem_ctx;
/* Complete argument */
- matches = (char **)malloc(sizeof(matches[0])*MAX_COMPLETIONS);
+ matches = malloc_array_p(char *, MAX_COMPLETIONS);
if (!matches) return NULL;
matches[0] = NULL;