From: Iker Pedrosa Date: Wed, 14 Jul 2021 09:59:38 +0000 (+0200) Subject: libmisc: don't free members variable X-Git-Tag: v4.9~3^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F383%2Fhead;p=thirdparty%2Fshadow.git libmisc: don't free members variable In 9eb191edc4a625bb68e827b18638f5b5816cb30c I included a free() that frees the members variable, which in turn causes the comma_to_list() function to return an array of empty elements. The array variable holds a list of pointers that point to offsets of the members variable. When the function succeeds freeing members variable causes the elements of the array variable to point to an empty string. This is causing several regressions in our internal testing environment. So, I'm reverting the change. Signed-off-by: Iker Pedrosa --- diff --git a/libmisc/list.c b/libmisc/list.c index d85d5f209..8837fa12c 100644 --- a/libmisc/list.c +++ b/libmisc/list.c @@ -263,8 +263,6 @@ bool is_on_list (char *const *list, const char *member) } } - free (members); - /* * Return the new array of pointers */