diff options
Diffstat (limited to 'source4/lib/util/ms_fnmatch.c')
-rw-r--r-- | source4/lib/util/ms_fnmatch.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/lib/util/ms_fnmatch.c b/source4/lib/util/ms_fnmatch.c index 8e216b0226..73fb0e0966 100644 --- a/source4/lib/util/ms_fnmatch.c +++ b/source4/lib/util/ms_fnmatch.c @@ -201,11 +201,10 @@ int ms_fnmatch(const char *pattern, const char *string, enum protocol_types prot if (pattern[i] == '*' || pattern[i] == '<') count++; } - max_n = talloc_array(NULL, struct max_n, count); - if (!max_n) { + max_n = talloc_zero_array(NULL, struct max_n, count); + if (max_n == NULL) { return -1; } - memset(max_n, 0, sizeof(struct max_n) * count); ret = ms_fnmatch_core(pattern, string, max_n, strrchr(string, '.')); |