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

[PATCH 14/15] builtin/cat-file: free memleak

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

Signed-off-by: Stefan Beller <redacted>
---

Notes:
    see discussion

 builtin/cat-file.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index df99df4..8de6b0d 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -104,6 +104,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
 		die("git cat-file %s: bad file", obj_name);
 
 	write_or_die(1, buf, size);
+	free(buf);
 	return 0;
 }
 
-- 
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