summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 949522cf7b..13f5b17781 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1594,10 +1594,13 @@ void set_namearray(name_compare_entry **ppname_array, char *namelist)
void free_namearray(name_compare_entry *name_array)
{
+ int i;
+
if(name_array == NULL)
return;
- SAFE_FREE(name_array->name);
+ for(i=0; name_array[i].name!=NULL; i++)
+ SAFE_FREE(name_array[i].name);
SAFE_FREE(name_array);
}