mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Fix memory leak found my Leo Qiu <leoxqiu@yahoo.com>.
Jeremy.
This commit is contained in:
parent
fdd449fe7b
commit
af6e4ea640
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user