summaryrefslogtreecommitdiff
path: root/source4/lib/util_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/util_str.c')
-rw-r--r--source4/lib/util_str.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c
index f8aadf8f59..0e58face16 100644
--- a/source4/lib/util_str.c
+++ b/source4/lib/util_str.c
@@ -1428,8 +1428,9 @@ BOOL add_string_to_array(TALLOC_CTX *mem_ctx,
{
char *dup_str = talloc_strdup(mem_ctx, str);
- *strings = talloc_realloc(*strings,
- ((*num)+1) * sizeof(**strings));
+ *strings = talloc_realloc_p(mem_ctx,
+ *strings,
+ const char *, ((*num)+1));
if ((*strings == NULL) || (dup_str == NULL))
return False;