Thread (7 messages) flat view 7 messages, 1 author, 2018-10-18
STALE2847d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v1 [diff vs current]

[PATCH 1/3] ref-filter: free memory from used_atom

From: Olga Telezhnaya <hidden>
Date: 2018-10-09 08:18:26
Subsystem: the rest · Maintainer: Linus Torvalds

Release memory from used_atom variable.

Signed-off-by: Olga Telezhnaia <redacted>
---
 ref-filter.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/ref-filter.c b/ref-filter.c
index e1bcb4ca8a197..1b71d08a43a84 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -1996,6 +1996,9 @@ 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(used_atom);
 	for (i = 0; i < array->nr; i++)
 		free_array_item(array->items[i]);
 	FREE_AND_NULL(array->items);

--
https://github.com/git/git/pull/538
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help