summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-01-24 19:19:25 +0000
committerJeremy Allison <jra@samba.org>2003-01-24 19:19:25 +0000
commitac49b63c1c692fe0cf173a5b40dc35ff15ba1194 (patch)
treebaa9db5a099d84253888b615a6bee3011a2f5a55 /source3/lib
parentdd072d240b9bca25e6e7394353cacf778847f86e (diff)
downloadsamba-ac49b63c1c692fe0cf173a5b40dc35ff15ba1194.tar.gz
samba-ac49b63c1c692fe0cf173a5b40dc35ff15ba1194.tar.bz2
samba-ac49b63c1c692fe0cf173a5b40dc35ff15ba1194.zip
Memory leak fix from Leo Qiu <leoxqiu@yahoo.com>.
Jeremy. (This used to be commit efd52f6ca7784a3edfc0371b5ff2054ad9704ab7)
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 ec967e4abf..d13d993da7 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1599,10 +1599,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);
}