Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH 3/3] refs.c: free duplicate entries in the ref array instead of leaking them

From: Brandon Casey <hidden>
Date: 2016-06-15 22:52:12
Subsystem: the rest · Maintainer: Linus Torvalds

From: Brandon Casey <redacted>


Signed-off-by: Brandon Casey <redacted>
---
 refs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/refs.c b/refs.c
index cbc4c5d..df39297 100644
--- a/refs.c
+++ b/refs.c
@@ -94,6 +94,7 @@ static void sort_ref_array(struct ref_array *array)
 				die("Duplicated ref, and SHA1s don't match: %s",
 				    a->name);
 			warning("Duplicated ref: %s", a->name);
+			free(b);
 			continue;
 		}
 		i++;
-- 
1.7.7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help