diff options
author | Jeremy Allison <jra@samba.org> | 2003-01-24 19:19:25 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-01-24 19:19:25 +0000 |
commit | ac49b63c1c692fe0cf173a5b40dc35ff15ba1194 (patch) | |
tree | baa9db5a099d84253888b615a6bee3011a2f5a55 /source3/lib | |
parent | dd072d240b9bca25e6e7394353cacf778847f86e (diff) | |
download | samba-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.c | 5 |
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); } |