From 5b75201dbb9f2e6799fd5c3eee8da6230caee96c Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Fri, 13 Nov 2009 03:57:48 +0200 Subject: 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 --- lib/util/util_strlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit