summaryrefslogtreecommitdiff
path: root/source4/libcli/clilist.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/clilist.c')
-rw-r--r--source4/libcli/clilist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libcli/clilist.c b/source4/libcli/clilist.c
index ba85ec397a..14fd3ee4f7 100644
--- a/source4/libcli/clilist.c
+++ b/source4/libcli/clilist.c
@@ -118,7 +118,8 @@ int smbcli_list_new(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
state.dirlist_len = 0;
state.total_received = 0;
- state.dirlist = talloc_new(state.mem_ctx);
+ state.dirlist = talloc_array(state.mem_ctx,
+ struct clilist_file_info, 0);
mask = talloc_strdup(state.mem_ctx, Mask);
if (level == RAW_SEARCH_DATA_GENERIC) {
@@ -275,7 +276,8 @@ int smbcli_list_old(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
state.total_received = 0;
state.data_level = RAW_SEARCH_DATA_SEARCH;
- state.dirlist = talloc_new(state.mem_ctx);
+ state.dirlist = talloc_array(state.mem_ctx, struct clilist_file_info,
+ 0);
mask = talloc_strdup(state.mem_ctx, Mask);
while (1) {