summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-01-24 19:20:01 +0000
committerJeremy Allison <jra@samba.org>2003-01-24 19:20:01 +0000
commit012f7aae4e980995a96bed12c7b0ac3af35265ba (patch)
tree38c1960e85f51c1d8644c87352e0d957594efca2 /source3/lib
parentc924528c86f4ff04db60bb021e12653f565bf68b (diff)
downloadsamba-012f7aae4e980995a96bed12c7b0ac3af35265ba.tar.gz
samba-012f7aae4e980995a96bed12c7b0ac3af35265ba.tar.bz2
samba-012f7aae4e980995a96bed12c7b0ac3af35265ba.zip
Fix memory leak found my Leo Qiu <leoxqiu@yahoo.com>.
Jeremy. (This used to be commit af6e4ea640828438fe234db1652dc4c1e10a487e)
Diffstat (limited to 'source3/lib')
-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);
}