diff options
Diffstat (limited to 'source3/lib/util_str.c')
-rw-r--r-- | source3/lib/util_str.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index fc13b75cc5..cd52faa52d 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -2428,8 +2428,10 @@ BOOL add_string_to_array(TALLOC_CTX *mem_ctx, *strings = TALLOC_REALLOC_ARRAY(mem_ctx, *strings, const char *, (*num)+1); - if ((*strings == NULL) || (dup_str == NULL)) + if ((*strings == NULL) || (dup_str == NULL)) { + *num = 0; return False; + } (*strings)[*num] = dup_str; *num += 1; |