From 886e1084d78cda218b4d1133e8154e8556f92222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C3=85gren?= Date: Sun, 1 Oct 2017 19:42:08 +0200 Subject: builtin/: add UNLEAKs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add some UNLEAKs where we are about to return from `cmd_*`. UNLEAK the variables in the same order as we've declared them. While addressing `msg` in builtin/tag.c, convert the existing `strbuf_release()` calls as well. Signed-off-by: Martin Ă…gren Signed-off-by: Junio C Hamano --- builtin/diff-index.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin/diff-index.c') diff --git a/builtin/diff-index.c b/builtin/diff-index.c index 185e6f9b58..09959f254f 100644 --- a/builtin/diff-index.c +++ b/builtin/diff-index.c @@ -57,5 +57,6 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix) return -1; } result = run_diff_index(&rev, cached); + UNLEAK(rev); return diff_result_code(&rev.diffopt, result); } -- cgit v1.2.3