Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH 2/3] bundle.c: fix memory leak

From: Stefan Beller <hidden>
Date: 2016-06-15 23:04:06
Subsystem: the rest · Maintainer: Linus Torvalds

The continue statements nearby also have an accompanying free(ref);

Signed-off-by: Stefan Beller <redacted>
---
 bundle.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/bundle.c b/bundle.c
index 2e2dbd5..534783d 100644
--- a/bundle.c
+++ b/bundle.c
@@ -342,6 +342,7 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
 		if (e->item->type == OBJ_TAG &&
 				!is_tag_in_date_range(e->item, revs)) {
 			e->item->flags |= UNINTERESTING;
+			free(ref);
 			continue;
 		}
 
-- 
2.3.0.81.gc37f363
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help