From c3cf23b00cb0c1e1afd7de518aa8881405cdc8b5 Mon Sep 17 00:00:00 2001 From: Iker Pedrosa Date: Wed, 14 Jul 2021 11:59:38 +0200 Subject: [PATCH] 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 --- libmisc/list.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libmisc/list.c b/libmisc/list.c index d85d5f20..8837fa12 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 */