return ret;
}
+
+BOOL add_string_to_array(TALLOC_CTX *mem_ctx,
+ const char *str, const char ***strings, int *num)
+{
+ char *dup_str = talloc_strdup(mem_ctx, str);
+
+ *strings = talloc_realloc(mem_ctx, *strings,
+ ((*num)+1) * sizeof(**strings));
+
+ if ((*strings == NULL) || (dup_str == NULL))
+ return False;
+
+ (*strings)[*num] = dup_str;
+ *num += 1;
+
+ return True;
+}
+
return True;
}
-void add_string_to_array(TALLOC_CTX *mem_ctx,
- const char *str, const char ***strings, int *num)
-{
- *strings = talloc_realloc(mem_ctx, *strings,
- ((*num)+1) * sizeof(**strings));
-
- if (*strings == NULL)
- return;
-
- (*strings)[*num] = str;
- *num += 1;
-
- return;
-}
-
/* Test whether querydispinfo level 5 and enumdomgroups return the same
set of group names. */
static BOOL test_GroupList(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,