Thread (16 messages) flat view 16 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 04/15] update-index: fix a memleak

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

`old` is not used outside the loop and would get lost
once we reach the goto.

Signed-off-by: Stefan Beller <redacted>
---
 builtin/update-index.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 5878986..6271b54 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -584,6 +584,7 @@ static int do_reupdate(int ac, const char **av,
 		path = xstrdup(ce->name);
 		update_one(path);
 		free(path);
+		free(old);
 		if (save_nr != active_nr)
 			goto redo;
 	}
-- 
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