ref-filter: free memory from used_atom
Release memory from used_atom variable for reducing number of memory leaks. Signed-off-by: Olga Telezhnaia <olyatelezhnaya@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5a0cc8aca7
commit
23941dd7b8
@ -1996,6 +1996,10 @@ void ref_array_clear(struct ref_array *array)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < used_atom_cnt; i++)
|
||||
free((char *)used_atom[i].name);
|
||||
FREE_AND_NULL(used_atom);
|
||||
used_atom_cnt = 0;
|
||||
for (i = 0; i < array->nr; i++)
|
||||
free_array_item(array->items[i]);
|
||||
FREE_AND_NULL(array->items);
|
||||
|
Loading…
Reference in New Issue
Block a user