summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>2009-11-13 03:57:48 +0200
committerAndrew Bartlett <abartlet@samba.org>2009-11-13 23:19:06 +1100
commit5b75201dbb9f2e6799fd5c3eee8da6230caee96c (patch)
treeb4a1bff875f4f270f98da67b5c2aee9a2154d577
parentb7839b73b10746c374ca2ed96eb152fa3a03e66a (diff)
downloadsamba-5b75201dbb9f2e6799fd5c3eee8da6230caee96c.tar.gz
samba-5b75201dbb9f2e6799fd5c3eee8da6230caee96c.tar.bz2
samba-5b75201dbb9f2e6799fd5c3eee8da6230caee96c.zip
util: str_list_unique() bugfix
j is actually the index of the last element in the list size of the list though is j+1 <- to make room for the terminating NULL element
-rw-r--r--lib/util/util_strlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/util_strlist.c b/lib/util/util_strlist.c
index 1331fee6a7..8d69eef233 100644
--- a/lib/util/util_strlist.c
+++ b/lib/util/util_strlist.c
@@ -401,7 +401,7 @@ _PUBLIC_ const char **str_list_unique(const char **list)
}
}
list[j] = NULL;
- list = talloc_realloc(NULL, list, const char *, j);
+ list = talloc_realloc(NULL, list, const char *, j + 1);
talloc_free(list2);
return list;
}